COBOL Display Computation

COBOL Usage Clause COBOL COMPUTATION

Advertisements


DISPLAY is the default computation.

DISPLAY internal memory format is ASCII.

The data will be stored in Decimal form.

DISPLAY usage clause applicable to all data types.

The memory allocation for DISPLAY USAGE is like below.


PictureNumber of Bytes
91
X1
A1

1 digit/Char= 1 byte

Let’s take an example for displaying all data types which are passing through program and see how it is after writing to the program.


Practical Example:


Code:



The above example, writing the record from the working-storage record and see how it is displayed during the file browse.

In the program, all variables declared with DISPLAY USAGE. In the DISPLAY USAGE, 1 digit/char equal to 1 byte.

So there should be no change in the output when we displayed on it.

The program output writing to MTH.COMP.OUTPUT file.

The below output shows the output written by the program and no change in the OUTPUT written from the input passed in the program.


Jcl:



Output:



COBOL Usage Clause COBOL COMPUTATION

Advertisements