View previous topic :: View next topic |
Author |
Message |
Sarangadhar Beginner
Joined: 14 Oct 2004 Posts: 130 Topics: 43 Location: virtual village
|
Posted: Tue May 31, 2005 5:59 am Post subject: Stopping a job |
|
|
Hi,
I have 4/5 procs in my job. In the first proc, based upon RC of first step, I have to stop/abend the job from running and returning that code.
I can't use COND parameter as its not good have COND for all 60-70 steps
I can't use If after first step and placing ENDIF at last step(60th step). New programmer, when he is analysing, he can't look thru the code for where the IF is ending. He should understand job is getting stopped from here itself. _________________ Thanks |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Tue May 31, 2005 7:29 am Post subject: |
|
|
Sarangdhar,
Move the first step of first proc to the JCL and check the return code or use IF-END-IF logic in the JCL itself. This process is self explanatory and can be understood by all.
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
Sarangadhar Beginner
Joined: 14 Oct 2004 Posts: 130 Topics: 43 Location: virtual village
|
Posted: Wed Jun 01, 2005 3:58 am Post subject: |
|
|
This proc called by more than one job. So, instead of changing all jobs and procs, Can I put a SAS step after that first step in that proc? Is it so worthful?
//OMITST IF (RC > 0) THEN
//STEP2 EXEC SAS
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTIONS ;
DATA _NULL_ ;
ABORT ABEND 666;
RUN ;
/*
//OMITEND ENDIF _________________ Thanks |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Wed Jun 01, 2005 9:04 am Post subject: |
|
|
Sarangadhar,
Why add another pgm/proc ?. You can check the return code of the first step and abend based on the return code
ex:
Code: |
//STEP0100 EXEC PGM=MY PGM
...
//STEP0101 EXEC PGM=ABEND,
// COND=(0,EQ,STEP0100)
//SYSUDUMP DD SYSOUT=*
|
Hope this helps...
Cheers
kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
Sarangadhar Beginner
Joined: 14 Oct 2004 Posts: 130 Topics: 43 Location: virtual village
|
Posted: Thu Jun 02, 2005 1:00 am Post subject: |
|
|
Thanks kolusu, This works fine. In fatc I donno about this PGM=ABEND earlier. Where can I find these kind info? _________________ Thanks |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Thu Jun 02, 2005 7:40 am Post subject: |
|
|
Sarangadhar,
Most shops have a standard abend routine program. Some sites have ABEND , ABEND99 , GDIABEND...
Ask your system programmers about this program.
Hope this helps...
Cheers
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
|
|