VALUE

Designate, as literals, any values that can be interpreted as PIC characters, such as embedded Xs and 9s to a mock-up text field. AMB considers two or more consecutive COBOL PIC characters a COBOL PIC clause and all other strings as literals, with the following exceptions
Restriction: This topic applies only when the AppMaster Builder AddPack has been installed, and applies only to Windows platforms.
  • The letter A is a literal character
  • A single hyphen is a COBOL picture character; a string of hyphens is a literal.
  • A 9 or an X bounded by spaces is a COBOL PIC; any other character surrounded by spaces is a literal.
  • Lower case letters are literals, not I/O fields.

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.

Syntax:

VALUE "characterstring" [PIC picclause]
    [DATA-NAME [IS] fieldname]

Parameters:

"characterstring" Designate a literal as follows:
  • First, enter the text field on the mock-up as a data field (that is, a series of Xs).
  • Then, code VALUE "characterstring", where characterstring is the literal value of the text field.
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.

Examples:

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)