To distinguish literals from PIC strings, such as the literal EXXON, which would be interpreted as the literal E, followed by the PIC string XX, and the literal ON, paint the word as a data field in the report mock-up and use the VALUE clause when coding the detail line data item description in your program.
VALUE "characterstring" [PIC picclause] [DATA-NAME [IS] fieldname]
"characterstring" | Designate a literal as follows:
|
DATA-NAME fieldname | Name a sum accumulator established by a SUM or REFERENCE clause. Do not define
fieldname in Working-Storage. At generation, AMB inserts
fieldname after the level number in the generated report group. DATA-NAME moves the value of the internal SUM accumulator to
fieldname.
Code DATA-NAME when a SUM UPON clause references DETAIL report group, when the program references a sum accumulator, or when a sum accumulator requires a data name for qualification. |
PIC picclause | Specify the format of characterstring. |
Create the report heading QUARTERLY REPORT FOR EXXON.
==== QUARTERLY REPORT FOR XXXXX ==== 01 TYPE IS PAGE HEADING. MOCKUP LINE 1 VALUE 'EXXON' PIC X(5)