Professional Documents
Culture Documents
SYNCSORT.
Syntax =>
Code:
SORT FIELDS=COPY
OUTREC FIELDS=(1,2,3,3,PD,TO=ZD,LEN=5)
Output =>
Code:
aa12345
---
//SYSIN DD *
SORT FIELDS=COPY
OUTREC BUILD=(1,2,3,8,PD,EDIT=(IIIIIIIIIIIIIII),80:X)
/*
----------
---------
When specifying a VALUE with a literal... you run into the limit not of the VALUE
clause, but of the alphanumeric literal. It is the size of the literal itself that
is the problem. With a figurative constant, or ALL as was shown, there is no
problem with the size.
160 bytes is a limit of the Standard, not of the compiler. In the '68 Standard, it
was a compiler-implementation limit. In the '74 Standard, it was specified, as 120,
for a "non-numeric literal". In '85 extended to 160 for an alphanumeric literal
(change of name). In 2014, it is 8191.
I think what this means is there is no compiler limit to the number of VALUE
clauses. There is of course another compiler limit which will affect that anyway,
which is 999,999 lines of source.
Splitting the field into smaller items seems a better way to get a long literal.
Code:
01 some-name.
05 FILLER PIC X(60) VALUE
"12345678901234567890123456789012345678901234567890AAAAAAAAA".
05 FILLER PIC X(60) VALUE
"12345678901234567890123456789012345678901234567890AAAAAAAAAA".
etc