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 set a return code ( like 8 , 12 ) in SORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
manugeorge2004

New User


Joined: 17 Jun 2009
Posts: 35
Location: Denver

PostPosted: Wed Feb 03, 2010 12:07 am    Post subject: How to set a return code ( like 8 , 12 ) in SORT
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    Post subject:
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: 35
Location: Denver

PostPosted: Wed Feb 03, 2010 12:32 am    Post subject: Reply to: How to set a return code ( like 8 , 12 ) in SORT
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    Post subject:
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 Moderator


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

PostPosted: Wed Feb 03, 2010 1:57 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts EXIT or RETURN cvnlynn CLIST & REXX 16 Wed Jul 19, 2017 2:50 am
No new posts UNIT=AFF for Easytrieve code gandikk JCL & VSAM 7 Wed Jul 12, 2017 11:42 pm
No new posts SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm


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