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

How to set a return code ( like 8 , 12 ) in SORT


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
manugeorge2004

New User


Joined: 17 Jun 2009
Posts: 38
Location: Denver

PostPosted: Wed Feb 03, 2010 12:07 am
Reply with quote

Hi

I need to get a return code greater than 4 in a SORT step for testing purpose. I tried simulating errors like SORT FIELDS exceeding LRECL. But it gives U0016 as the return code

Any help is appreciated
Back to top
View user's profile Send private message
rockish

Active User


Joined: 05 Jun 2009
Posts: 185
Location: Planet Earth

PostPosted: Wed Feb 03, 2010 12:28 am
Reply with quote

Could you please elaborate on what you 'really' want to do ? As people here might provide you a better solution.
Back to top
View user's profile Send private message
manugeorge2004

New User


Joined: 17 Jun 2009
Posts: 38
Location: Denver

PostPosted: Wed Feb 03, 2010 12:32 am
Reply with quote

I have a sort step..If the return code of that step 4 or less, I am executing the next step. I want to test the negative condition. ie. i need to get a RC > 4 for my SORT step so that the next step is skipped. If I try having invalid syntax for SORT or position in SORT CARD, greated than LRECL, SORT abends. The job doesnt proceed further. I m looking for a way where I can tweak my SORT card to force it tp give RC > 4
Back to top
View user's profile Send private message
rockish

Active User


Joined: 05 Jun 2009
Posts: 185
Location: Planet Earth

PostPosted: Wed Feb 03, 2010 12:46 am
Reply with quote

One quick way i can think of (and tried in my system) is to try reading more bytes than actually available from the input file.

A sort card like below will give RC 16 if the input dataset RECL is less than or equal to 80

Code:
SORT FIELDS=COPY   
OUTREC FIELDS=(1,81)
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Feb 03, 2010 1:57 am
Reply with quote

Quote:
it gives U0016 as the return code


Whether DFSORT gives RC=16 or a user abend depends on your site's setting for the ERET installation option (ERET=RC16 or ERET=ABEND). It appears your site has it set to ERET=ABEND. You can override this for a particular job using the following control statement:

Code:

//DFSPARM DD *
  DEBUG NOABEND
/*
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts JCL sort card - get first day and las... JCL & VSAM 9
Search our Forums:

Back to Top