VALUE enables you to code VALUE clauses into your data structures.
Restriction: This topic applies only when the AppMaster Builder AddPack has been installed, and applies only to Windows platforms.
Syntax:
dataname PICformat
[...] [VALUE|V] 'valueclause'
Syntax Rules:
- Valueclause can be as long as you need, continuing on subsequent lines with the continuation symbol.
- You can code
valueclause on the same line as
dataname, if it fits entirely on that line.
- Do not enclose numeric values in single quotation marks.
Example 1: Data Structure Editor format
-LINE- ----- Data Structure Editor ----------
000001 WRK1-FIELD-7 X(120)
000002 ... VALUE 'A LONG LITERAL MAY BE
000003 ... CONTINUED ON ONE OR
000004 ... MORE LINES'
000005 WRK1-FIELD-8 X(80)
000006 ... V 'A VALUE CLAUSE THAT SPANS
000007 ... TWO OR MORE LINES MUST BEGIN
000008 ... ON ITS OWN LINE'
Example 2: Generated COBOL code
01 WRK1-FIELD-7 VALUE 'A LONG LITERAL MAY BE CONT
'INUED ON ONE OR MORE LINES'
PIC X(120).
01 WRK1-FIELD-8 VALUE 'A VALUE CLAUSE THAT SPANS
'TWO OR MORE LINES MUST BEGIN ON ITS OWN LINE'
PIC X(80).
Example 3: Data Structure Editor format
-LINE- ------- Data Structure Editor ---------
000001 WRK1-FIELD-5 x(18) V'18 CHARACTERS LONG'
000002 WRK1-FIELD-6 x(13)
000003 ... V'13 CHARS LONG'
Example 4: Generated COBOL code
01 WRK1-FIELD-5 PIC X(18)
VALUE '18 CHARACTERS LONG'.
01 WRK1-FIELD-6 VALUE '13 CHARS LONG'
PIC X(13).a