KR editions 128 to 130
KR-128 : JCL puzzle
Can you spot the error in this JCL (the SYNCSORT has been dealt with in the previous edition)
Assume that both the datasets SORTIN and SORTOUT exist. We get a JCL error; why? Is something wrong with the RESTART parameter?
//USERIDA JOB (ACCOUNT),'COMPANY',RESTART=STEPYY, TIME=1,NOTIFY=&SYSUID //* //STEPXX EXEC PGM=SYNCSORT //SORTIN DD DSN=TEMP.FORMATED.OUTPUT, // DISP=SHR //SORTOUT DD DSN=TEMP.FORMATED.OUTPUT2, // DISP=(OLD,CATLG,CATLG) //SYSOUT DD SYSOUT=* //SYSIN DD * SORT FIELDS=(1,1,CH,D) /* // //STEPYY EXEC PGM=SYNCSORT //*Assume that everything following this is correct //
If we PREP this JCL we get an error saying STEPYY is not found.
The reason being the NULL statment present in the JCL before STEPYY.
When we submit this job, the JCL reader will read only upto the null statement (and the first null statement is present before STEPYY).
And it is only upto this portion of the jcl which will get submitted - so if we submit this jcl and check up the spool we find that STEPYY won't be listed in JESJCL. Thus STEPYY is not found and it is flagged as an error.
To avoid this error we'll have to comment out the null statement before STEPYY.
KR-129 : FBA->FB using SYNCSORT...Contributed by Divya
How do we convert an FBA to FB?
In an FBA the first column is used for control characters with the actual data starting from column 2.
One option for conversion is to use SYNCSORT itself:
//STEP02 EXEC PGM=SYNCSORT //SORTIN DD DSN=INPUT.FILE.TEST,DISP=SHR //SORTOUT DD DSN=OUTPUT.FILE.TEST, // DISP=(NEW,CATLG,DELETE),RECFM=FB //SYSOUT DD SYSOUT=* //SYSIN DD * SORT FIELDS=COPY OUTREC FIELDS=(1:2,130,1X) /* //
Here we simply copy the the data from column 2 onwards from the SORTIN file to SORTOUT file.
130 denotes the number of characters to be copied and 1X indicates that a space should be added after that.
KR-130 : JCL puzzle on FBA -> FB
We have a JCL:
//STEP01 EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSUT1 DD DSN=TEST.FORMATED.INPUT,DISP=SHR //SYSUT2 DD DSN=TEST.FORMATED.OUTPUT, // DISP=(NEW,CATLG,DELETE), // UNIT=SYSDA, // SPACE=(TRK,(1,5),RLSE), // DCB=RECFM=FB //SYSIN DD DUMMY
where SYSUT1 is a flat file in FBA format which has the following:
The first view is in VIEW mode (in which control characters in the first column are displayed). The 2nd snap is in BROWSE mode (in which the 1st column of FBA file, i.e. the control characters won't be displayed).
What happens when the JCL is executed? What will SYSUT2 contain?
Is it equivalent to converting a FBA->FB or is there something wrong?
The snap below is how SYSUT2 looks in BROWSE mode:
The control character is also copied by IEBGENER into the first column of the FB file but the format is FB not FBA!!!).
Go back to the main contents page
Copyright © 2020 Sethu Subramanian All rights reserved. Reach me via email at ssbell @ gmail.com