0
votes

I have a task to write a JCL job invoking ICETOOL/DFSORT to generate a report. The report takes a VSAM KSDS as input and generates a list of bank branches.

Each record in the BRANCHES KSDS is of the form

• 4-byte binary unsigned integer representing a 6-digit decimal branch sortcode (e.g. 420101)

• 1-byte EBCDIC flag: ◦ EBCDIC 'A' means the branch is owned by ZeusBank and all its accounts are held in the ACCOUNTS KSDS

◦ EBCDIC 'B' means the branch is not owned by ZeusBank so we do not hold its account information in the ACCOUNTS KSDS

• 32-byte EBCDIC character branch name (e.g. “ZEUSBANK FOOFORD BAR STREET” or “OTHERBANK QUUXHAM BAZ ROAD”), blank padded on the right.

The report should look like this

enter image description here

I'm pretty new to JCL so please forgive if the question is simple. Thanks.

1
Is the report sorted on 1 byte flag? Do you want header only once or should it be repeated after a set of records? - user6542823
This link should help you, if you need more help then let me know: ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/… - user6542823
Yeah I want it's once only, I have come across the headers thing but there's an error which stop me from doing anything [ibb.co/kNy0tR]. How can I fix this? - Tri Nguyen
What is the error? I Can't see the link. - user6542823
My report looks like this [pastebin.com/gQS9ZEBr]. And I got the error, O. MESSAGE 1 HASP105 EXPECTED CONTINUATION NOT RECEIVED 1 IEFC621I EXPECTED CONTINUATION NOT RECEIVED 2 IEFC662I INVALID LABEL 2 IEFC605I UNIDENTIFIED OPERATION FIELD. How can I fix it? Thanks. - Tri Nguyen

1 Answers

0
votes

You can try this:

//STEPSORT EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SORTIN DD DSN=DATASETNAME
//SORTOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(5,1,CH,A)
OUTFIL HEADER2=(1:C'LIST OF WHATEVER BANK',4/,
1:C'SORTCODE',10:C'FLAG',15:C'BRANCH',/,
1:C'--------',10:C'----',15:C'------'),
BUILD=(1:1,4,BI,TO=ZD,LENGTH=6,10:5,1,15:6,32)
/*