COBOL Display Statement

COBOL Compute Statement COBOL Stoprun

Advertisements


DISPLAY used to transfer the data to the output device/screen.

Output device can be decided based on the SYSOUT in JCL if it is a batch program.

Syntax:
	DISPLAY identifier-1 [WITH NO ADVANCING].

WITH NO ADVANCING is optional in DISPLAY.

If NO ADVANCING option specifies, CURSOR will be placed after the last character of current display statement operand.

If NO ADVANCING option not specifies, then the cursor on the output device/screen will move to the next line.

DISPLAY statement can be of two types based on its usage.

1. DISPLAY statement used to print the identifier/data item on the output device/screen.

In this case, DISPLAY considered as a executable statement always and displays the data always on output device.

Syntax:
	DISPLAY identifier-1 [WITH NO ADVANCING].

2. DISPLAY statement which will be used along with DEBUGGING MODE.

In this case, DISPLAY statement considered as executable statement when the DEBUGGING MODE enabled in the program.

In other cases the DISPLAY statement will be considered as a Comment.


Syntax:
	D	DISPLAY identifier-1 [WITH NO ADVANCING].

These DISPLAYs will be coded with D in the 7th column.


If any questions on the above, post your queries on Cobol Discussion forum


COBOL Compute Statement COBOL Stoprun

Advertisements