COBOL Display Computation
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.
|Picture||Number of Bytes|
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.
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.
COBOL Usage Clause COBOL COMPUTATION