IBM Extension

Format 5 – Data Area

This statement is used to transfer data to the data area specified in the FOR phrase.

Read syntax diagramSkip visual syntax diagram
DISPLAY Statement - Format 5 - Data Area

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

>--FOR--+-identifier-2-+---------------------------------------->
        '-literal-2----'   

>--+-----------------------------------+------------------------>
   '-+----+--LIBRARY--+-identifier-3-+-'   
     '-IN-'           '-literal-3----'     

>--+----------------------+--+-----------+---------------------->
   '-AT--+-identifier-4-+-'  '-WITH LOCK-'   
         '-integer-1----'                    

>--+-------------------------------------------+---------------->
   '-+----+--EXCEPTION--imperative-statement-1-'   
     '-ON-'                                        

>--+------------------------------------------------+----------->
   '-NOT--+----+--EXCEPTION--imperative-statement-2-'   
          '-ON-'                                        

>--+-------------+---------------------------------------------><
   '-END-DISPLAY-'   

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

The DISPLAY statement's literal operands, or the contents of the DISPLAY statement's identifier operands, are written to the 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.

Start of change For more information and an example of how to use data areas, see the "Using Data Areas You Create" information in the "Passing Data Using Data Areas" section of the IBM Rational Development Studio for i: ILE COBOL Programmer's Guide. End of change

identifier-1/literal-1
The conversion and display rules for identifier-1 and literal-1 are described under Format 1 - Data Transfer.

Identifier-1 can be date-time data item.

End of IBM Extension