Author:
amorante
Subject: SORT Trailer Count - LRECL Output controlled by Input (?)
Posted: Tue Aug 29, 2017 8:57 pm (GMT 5.5)
I have a Sort improvement I would like to make ,
Requirement: Input (25 bytes) SORTOF3 (80 bytes)
//STEP0A2 EXEC PGM=SORT
//SORTIN DD dsn=filename ( lrecl=25)
//SORTOUT DD DSN=fileout (lrecl=25)
//SORTOF2 DD DSN=fileof2 (lrecl=25)
//SORTOF3 DD DSN=fileof3 ( need this to be 80 )
//SYSIN DD *
SORT FIELDS=(1,25,CH,A)
SUM FIELDS=NONE
OUTFIL FILES=(OUT)
OUTFIL FILES=(2)
OUTFIL FILES=(3),REMOVECC,NODETAIL,
TRAILER1=(1:'I000000002000000001000',COUNT=(M11,LENGTH=15),43C' ')
This fails with :
ICE222A 0 25 BYTE FIXED RECORD LENGTH IS NOT EQUAL TO 80 BYTE LRECL FOR SORTOF3
How can I convert :
OUTFIL FILES=(3),REMOVECC,NODETAIL,
TRAILER1=(1:'I000000002000000001000',COUNT=(M11,LENGTH=15),43C' ')
To:
OUTFIL FILES=(3),REMOVECC,NODETAIL,
Replacing the trailer1 with a statement
USING Outrec or Build so the output LRECL = 80
Why:
All I need Is to count the number of record in sortinâ¦. Output format as shown, question is can I do it in the same step or do I have to add another step and then
I could alter the input using INREC to go up to 80 and then use trailer1 for sortof3,
( this changes sortof2 and sortout to be 80 which is no good, that is why I would have to add another step, seriously ?)
_________________
alberto