IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to resolve S013 abend


IBM Mainframe Forums -> ABENDS & Debugging
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ArchanaKalwani

New User


Joined: 11 Aug 2008
Posts: 6
Location: India

PostPosted: Thu Jul 29, 2010 2:44 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jul 29, 2010 3:03 pm
Reply with quote

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
View user's profile Send private message
ArchanaKalwani

New User


Joined: 11 Aug 2008
Posts: 6
Location: India

PostPosted: Thu Jul 29, 2010 3:12 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jul 29, 2010 3:15 pm
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Jul 29, 2010 3:23 pm
Reply with quote

From 2nd SORT job remove PARM='RC16=ABE' from EXEC and NULLOUT=RC16 from control-cards and try again.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jul 29, 2010 3:40 pm
Reply with quote

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
View user's profile Send private message
ArchanaKalwani

New User


Joined: 11 Aug 2008
Posts: 6
Location: India

PostPosted: Thu Jul 29, 2010 3:52 pm
Reply with quote

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. icon_biggrin.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jul 29, 2010 3:52 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jul 29, 2010 3:53 pm
Reply with quote

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.


since &&SF3 is the problem file.

also, the S013, is ABEND
specifies that if your sort, copy, or merge is unsuccessful, DFSORT abends with a user completion code equal to the appropriate message number or with a user-defined number between 1 and 99, as set during installation with installation option ABCODE=n.


as expat implied, removing the PARM is not going to help.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Jul 29, 2010 4:40 pm
Reply with quote

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... icon_neutral.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Jul 29, 2010 5:00 pm
Reply with quote

Anuj, S013-20 is a DCB conflict abend. There is no mention of RC=16 anywhere. What have you been smoking icon_eek.gif

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
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Jul 29, 2010 5:17 pm
Reply with quote

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)               
icon_redface.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Jul 29, 2010 5:42 pm
Reply with quote

you guys are as bad as the other members who do not read links.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Jul 29, 2010 7:30 pm
Reply with quote

Now I understand why Frank has stopped me to poke in SORT threads icon_redface.gif.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> ABENDS & Debugging

 


Similar Topics
Topic Forum Replies
No new posts ISAM and abend S03B JCL & VSAM 10
No new posts Need help to resolve a hard edit COBOL Programming 8
This topic is locked: you cannot edit posts or make replies. Need help to resolve a hard edit COBOL Programming 4
No new posts Abend S0C4 11 (Page Translation Excep... PL/I & Assembler 16
No new posts WER999A - UNSUCCESSFUL SORT 8ED U Ab... SYNCSORT 5
Search our Forums:

Back to Top