I have an input file (flat file FB length 520) which has a header record, multiple data records and a trailer record. The first byte of the file identifies the record type, value 1 for header, 2 for data and 3 for trailer.
I am trying to write a JCL which will split the input file to separate out header in a file, trailer in another file. And a third file will have the count of data records in the input file. In the next step I am comparing the count of data records with another trailer file.
The first step of the JCL is executing fine but the second step is abending with S013.
Please could someone help me with this error. I have checked for basic blocksize, lengths and other attributes as mentioned in other posts but could not find anything wrong.
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
From the IBM manuals you should have accessed before posting.
Quote:
20
An OPEN macro instruction was issued for a sequential data set using queued access. BLKSIZE is not a multiple of LRECL, or LRECL is 0 with RECFM=FB or RECFM=FBS, or BLKSIZE is not at least four bytes greater than LRECL with RECFM=V.
So I would hazard a guess that the output created in the previous step is incorrect.
Thanks all for your help.
I defined the output files of step1 to be of length 80 bytes and it is working now. It seems like dsn associated with SYMNAMES should be 80 bytes only.
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
i would venture a guess
(I apologize Frank, Kolusu for posting here)
that SORTOF3 contains no records or is an improper rec len,
since it is a synames file.
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
Quote:
OPTION COPY,NULLOUT=RC16,STOPAFT=1
INCLUDE COND=(27,07,ZD,EQ,REC_COUNT)
Above will set a retun code of 16 if the INCLUDE gives an empty SORTOUT. And this
Quote:
PGM=SORT,PARM='RC16=ABE'
will tell the SORT to issue an abend if RC=16. So removing the PARMs looked like a way to go but after the latest response from OP, I'm kinda confused, well...
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
Anuj, S013-20 is a DCB conflict abend. There is no mention of RC=16 anywhere. What have you been smoking
So when the OP then gave the output file the correct attributes, FB 80, the abend was resolved. I believe that SYMNAMES needs to be FB 80, and because the OP had not specified the correct attributes in the first SORT step, the output would clone the attributes of the SORTIN DD which was LRECL=520 and thus cause the ABEND.