Posted: Sun Oct 16, 2005 5:03 pm Post subject: Sort step return code not picked up
I have a last step in my JCL which needs to be executed if prior steps return error code > 4 COND=(04,GE). This works for all conditions except one.
There is a prior sort step in the JCL. If I make its syntax incorrect, it will return a code of 16. But when I do this, the last step is not getting executed.
But if I give the stepname in the last step COND=(04,GE,SortStepName), then the last step gets executed.
I am not sure why, when I saw Sort step sysout, it shows an RC of 0, but in the JESMSGLG, it shows 16 for that step.
Joined: 26 Nov 2002 Posts: 12367 Topics: 75 Location: San Jose
Posted: Sun Oct 16, 2005 6:09 pm Post subject:
Quote:
There is a prior sort step in the JCL. If I make its syntax incorrect, it will return a code of 16. But when I do this, the last step is not getting executed.
But if I give the stepname in the last step COND=(04,GE,SortStepName), then the last step gets executed.
Mkarthik,
Check this link for a detailed explanation of COND parameter.
Joined: 03 Dec 2002 Posts: 579 Topics: 1 Location: Iowa, USA
Posted: Wed Oct 19, 2005 9:36 am Post subject:
Is the SORT invoked by a calling program? Perhaps the calling program gets control after the SORT CC=16 and sets the STEPCC as zero.
If the SORT step is simply a JCL invoked sort I don't know why the STEPCC would be zero if the SORT msgs show CC=16? _________________ Regards,
Bill Dennis
Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum