Page 1 of 1

Job abends

PostPosted: Mon May 07, 2012 3:26 pm
by ashwin1990
i have a job consisting of 2 steps. The first step is meant to repro contents of one file to another file. The second step is meant to sort the ouput file of the previous step. Now when i execute the job, my 1st step has a return code of 0 and 2nd step has a return code of 12.

My question is whether the contents would be successfully reproed as the return code was 0 for the 1st step(irrespective of the return code of the 2nd step)

Re: Job abends

PostPosted: Mon May 07, 2012 3:34 pm
by BillyBoyo
Yes. Everything you see as output from your first step has been done successfully.

Your job did not abend. That is a different thing to obtaining a non-zero return code.

Re: Job abends

PostPosted: Mon May 07, 2012 3:48 pm
by ashwin1990
My job has a MACC =12. Still the contents are reproed?????

Re: Job abends

PostPosted: Mon May 07, 2012 3:54 pm
by BillyBoyo
If you don't believe be, look at the SYSOUT from the IDCAMS step. If that tells you the file is copied, the file is copied, no matter what else happens to the job.

If you think the file is not copied, post the JCL for the step, and the Sysout from the step, in the Code tags please.

Re: Job abends

PostPosted: Mon May 07, 2012 4:03 pm
by ashwin1990
ok............ thnks for ur help..:)

Re: Job abends

PostPosted: Mon May 07, 2012 10:01 pm
by dick scherrer
Hello,

First you mention a return code 12, then later mention a MAXCC=12. Which is it?

Suggest you post the first 3 sysout datasets (using the "Code" tag for readability).

Re: Job abends

PostPosted: Wed May 09, 2012 12:26 pm
by ashwin1990
Its a MAXCC = 12

Re: Job abends

PostPosted: Wed May 09, 2012 6:26 pm
by NicC
Are you sure the idcams step gives a return code of 0? And the sort step gives a return code of 12? Please show - using the code tags.

Re: Job abends

PostPosted: Wed May 09, 2012 6:34 pm
by Ed Goodman
I don't want to assume that the first step is correct by itself, so I'm going to say: "The return code of the second step will not affect the processing of the first step."

IF (<- Capital letters) your first step worked correctly, and IF you have a proper output file defined, either pre-allocated or allocated in the JCL, and it gets kept/cataloged in the first step, AND the second step doesn't delete it...

As I was typing it I realized the futility of trying to encompass all the possibilities. Do this - run the first step alone and make sure it's doing what you want. That will answer most of the questions.