Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to resolve S013 abend

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> ABENDS & Debugging
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    Post subject: How to resolve S013 abend
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: 8593
Location: Back in jolly old England

PostPosted: Thu Jul 29, 2010 3:03 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Jul 29, 2010 3:15 pm    Post subject:
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

Senior Member


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

PostPosted: Thu Jul 29, 2010 3:23 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Jul 29, 2010 3:40 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Jul 29, 2010 3:52 pm    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Thu Jul 29, 2010 4:40 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Jul 29, 2010 5:00 pm    Post subject:
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

Senior Member


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

PostPosted: Thu Jul 29, 2010 5:17 pm    Post subject: Reply to: How to resolve S013 abend
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    Post subject:
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

Senior Member


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

PostPosted: Thu Jul 29, 2010 7:30 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> ABENDS & Debugging All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm
No new posts hot to get details when "EXEC CI... Andi1982 CICS 11 Tue Sep 20, 2016 5:01 pm
No new posts S213-14 ABEND explantion Apurva Mehta JCL & VSAM 5 Thu Jul 07, 2016 10:56 pm
No new posts How to resolve IMS DB status code FM Priyanka Boga IMS DB/DC 3 Fri Jun 10, 2016 1:54 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us