MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Stopping a job

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
Sarangadhar
Beginner


Joined: 14 Oct 2004
Posts: 130
Topics: 43
Location: virtual village

PostPosted: Tue May 31, 2005 5:59 am    Post subject: Stopping a job Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue May 31, 2005 7:29 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Sarangadhar
Beginner


Joined: 14 Oct 2004
Posts: 130
Topics: 43
Location: virtual village

PostPosted: Wed Jun 01, 2005 3:58 am    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Wed Jun 01, 2005 9:04 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Sarangadhar
Beginner


Joined: 14 Oct 2004
Posts: 130
Topics: 43
Location: virtual village

PostPosted: Thu Jun 02, 2005 1:00 am    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Jun 02, 2005 7:40 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group