|
View previous topic :: View next topic
|
| Author |
Message |
ArchanaKalwani
New User
Joined: 11 Aug 2008 Posts: 6 Location: India
|
|
|
|
Hi,
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.
| Code: |
//STEP1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=input file,
// DISP=SHR
//SORTOF1 DD DSN=&&SF1,DISP=(,PASS),SPACE=(CYL,(1,0),RLSE)
//SORTOF2 DD DSN=&&SF2,DISP=(,PASS),SPACE=(CYL,(1,0),RLSE)
//SORTOF3 DD DSN=&&SF3,DISP=(,PASS),SPACE=(CYL,(1,0),RLSE)
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FNAMES=SORTOF1,
INCLUDE=(1,1,CH,EQ,C'1')
OUTFIL FNAMES=SORTOF3,REMOVECC,NODETAIL,
INCLUDE=(1,1,CH,EQ,C'2'),
TRAILER1=('REC_COUNT,',COUNT=(M11,LENGTH=07))
OUTFIL FNAMES=SORTOF2,
INCLUDE=(1,1,CH,EQ,C'3'),
BUILD=(1:27,7)
/*
//*
//STEP02 EXEC PGM=SORT,PARM='RC16=ABE'
//SYSOUT DD SYSOUT=*
//SYMNOUT DD SYSOUT=*
//SYMNAMES DD DSN=&&SF3,DISP=SHR
//SORTIN DD DSN=XYZ5313.TRAILER.REC,DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY,NULLOUT=RC16,STOPAFT=1
INCLUDE COND=(27,07,ZD,EQ,REC_COUNT)
/* |
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. |
|
| Back to top |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
The output showing both the abend and reason code might be a more appropriate thing to post, along with the IEC141I message.
Showing us the input doesn't help too much. |
|
| Back to top |
|
 |
ArchanaKalwani
New User
Joined: 11 Aug 2008 Posts: 6 Location: India
|
|
|
|
| Code: |
| IEC141I 013-20,IGG0191A,AAK5313A,STEP02,SYMNAMES,104E,WRKP01,SYS10210.T103634..RA000.AAK5313A.SF3.H03 |
and this is the error message
| Code: |
ICE751I 2 C5-K90013 DA-K28804
ICE185A 0 AN S013 ABEND WAS ISSUED BY DFSORT, ANOTHER PROGRAM OR AN EXIT (PHASE 0) |
|
|
| Back to top |
|
 |
expat
Global Moderator

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. |
|
| Back to top |
|
 |
Anuj Dhawan
Superior Member

Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
| From 2nd SORT job remove PARM='RC16=ABE' from EXEC and NULLOUT=RC16 from control-cards and try again. |
|
| Back to top |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
| Anuj Dhawan wrote: |
| From 2nd SORT job remove PARM='RC16=ABE' from EXEC and NULLOUT=RC16 from control-cards and try again. |
The OP is not getting RC=16 but an S013-20 abend, so I'm not sure how this would help. |
|
| Back to top |
|
 |
ArchanaKalwani
New User
Joined: 11 Aug 2008 Posts: 6 Location: India
|
|
|
|
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.  |
|
| Back to top |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
ArchanaKalwani
Can you explain to us exactly what it is that you want to achieve.
OK, don't bother now that you have resolved the problem. |
|
| Back to top |
|
 |
dbzTHEdinosauer
Global Moderator

Joined: 20 Oct 2006 Posts: 6965 Location: porcelain throne
|
|
| Back to top |
|
 |
Anuj Dhawan
Superior Member

Joined: 22 Apr 2006 Posts: 6248 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...  |
|
| Back to top |
|
 |
expat
Global Moderator

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. |
|
| Back to top |
|
 |
Anuj Dhawan
Superior Member

Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
expat - I tried with below job, and looks like because of "instream data" SF3 did not play nasty with me and job ran with RC=0.
| Code: |
//STEP1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
1HEADER
2DATA1
2DATA1
2DATA1
2DATA1
2DATA1
3TRAILER
/*
//*
//SORTOF1 DD DSN=&&SF1,DISP=(,PASS),SPACE=(CYL,(1,0),RLSE)
//SORTOF2 DD DSN=&&SF2,DISP=(,PASS),SPACE=(CYL,(1,0),RLSE)
//SORTOF3 DD DSN=BCST.TEMP.SF3,DISP=(,PASS),SPACE=(CYL,(1,0),RLSE)
//SORTWK01 DD UNIT=SYSDA,SPACE=(CYL,(5,3))
//SORTWK02 DD UNIT=SYSDA,SPACE=(CYL,(5,3))
//SORTWK03 DD UNIT=SYSDA,SPACE=(CYL,(5,3))
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FNAMES=SORTOF1,
INCLUDE=(1,1,CH,EQ,C'1')
OUTFIL FNAMES=SORTOF3,REMOVECC,NODETAIL,
INCLUDE=(1,1,CH,EQ,C'2'),
TRAILER1=('REC_COUNT,',COUNT=(M11,LENGTH=07))
OUTFIL FNAMES=SORTOF2,
INCLUDE=(1,1,CH,EQ,C'3'),
BUILD=(1:27,7)
/*
//*
//STEP02 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SYMNOUT DD SYSOUT=*
//SYMNAMES DD DSN=BCST.TEMP.SF3,DISP=(SHR)
//SORTIN DD *
123434213455636456356456345634563563456345
//SORTOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY,STOPAFT=1
INCLUDE COND=(27,07,ZD,EQ,REC_COUNT) |
 |
|
| Back to top |
|
 |
dbzTHEdinosauer
Global Moderator

Joined: 20 Oct 2006 Posts: 6965 Location: porcelain throne
|
|
|
|
| you guys are as bad as the other members who do not read links. |
|
| Back to top |
|
 |
Anuj Dhawan
Superior Member

Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Now I understand why Frank has stopped me to poke in SORT threads . |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|