View previous topic :: View next topic
|
Author |
Message |
manugeorge2004
New User
Joined: 17 Jun 2009 Posts: 38 Location: Denver
|
|
|
|
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 |
|
|
rockish
Active User
Joined: 05 Jun 2009 Posts: 185 Location: Planet Earth
|
|
|
|
Could you please elaborate on what you 'really' want to do ? As people here might provide you a better solution. |
|
Back to top |
|
|
manugeorge2004
New User
Joined: 17 Jun 2009 Posts: 38 Location: Denver
|
|
|
|
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 |
|
|
rockish
Active User
Joined: 05 Jun 2009 Posts: 185 Location: Planet Earth
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
|