IBM Extension
IBM Extension

Format 2 – Local Data Area

This format is used to transfer data to the system-defined local data area created for a job.

Read syntax diagramSkip visual syntax diagram
DISPLAY Statement - Format 2 - Local Data Area

            .------------------.                        
            V                  |                        
>>-DISPLAY----+-identifier-1-+-+--UPON--mnemonic-name----------->
              '-literal-1----'                          

>--+---------------------------+--+-------------+--------------><
   |                       (1) |  '-END-DISPLAY-'   
   '-FOR--+-identifier-2-+-----'                    
          '-literal-2----'                          

Notes:
  1. Syntax-checked only.

This format is only applicable when the mnemonic-name in the SPECIAL-NAMES paragraph is associated with the environment-name LOCAL-DATA.

The conversion and display rules for identifier-1 and literal-1 are described under Format 1 - Data Transfer. However, the restriction that if the description of identifier-1 contains a TYPE clause, that the type-name referenced be elementary, does not apply.

Identifier-2 and literal-2 cannot be floating-point data items.

Identifier-1 can be a date-time data item.

Identifier-1 can be a DBCS or national data item.

The DISPLAY statement’s literal operands, or the contents of the DISPLAY statement’s identifier operands, are written to the system-defined local data area of the job containing the program that issues the DISPLAY. The data is written to the local data area according to the rules of the MOVE statement for a group move, without the CORRESPONDING phrase, and without padding on the right with spaces.

The FOR phrase, when specified, is syntax checked during compilation but is treated as comments during execution. The value of literal-2 or identifier-2 indicates the program device name of the device that is writing data to the local data area. There is only one local data area for each job, and all devices in a job access the same local data area. Literal-2, if specified, must be nonnumeric and 10 characters or less in length, and identifier-2, if specified, must refer to an alphanumeric data item 10 characters or less in length.

For more information about the local data area, see the CL Programming manual and the IBM® Rational® Development Studio for i: ILE COBOL Programmer's Guide.

End of IBM Extension
End of IBM Extension