IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

need details on return code


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
veena_nagesh2002
Warnings : 1

Active User


Joined: 07 May 2005
Posts: 110
Location: hyderabad

PostPosted: Wed May 14, 2008 3:07 pm
Reply with quote

I have job with two steps and both steps are submitting two different jobs

Is it possible to execute the step2 based on completion of job (RC) which is submitted in the prior step. if so can some body provide me the details
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed May 14, 2008 3:11 pm
Reply with quote

NO!

cross jobs step-condition-code checking is possible ( to some extent ) only thru a scheduler
Back to top
View user's profile Send private message
veena_nagesh2002
Warnings : 1

Active User


Joined: 07 May 2005
Posts: 110
Location: hyderabad

PostPosted: Wed May 14, 2008 3:15 pm
Reply with quote

thanks for quick reply

so there is no solution apart from scheduler
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Wed May 14, 2008 6:12 pm
Reply with quote

enrico-sorichetti wrote:
NO!

cross jobs step-condition-code checking is possible ( to some extent ) only thru a scheduler
But if the job with the RC in question is submitting the second job, can the RC be passed as a SET type parameter?
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu May 15, 2008 4:32 am
Reply with quote

Hi,
why have a job submit another 2 jobs ? Why not submit the real job and if rc of 0 then submit the next job.


Gerry
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Thu May 15, 2008 4:50 am
Reply with quote

gcicchet wrote:
why have a job submit another 2 jobs ? Why not submit the real job and if rc of 0 then submit the next job.
That sounds like "there is no solution apart from scheduler".......
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Thu May 15, 2008 5:03 am
Reply with quote

Hi,
even a scheduling tool would not fix this problem, how would you prevent step2 from executing ?


Gerry
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Thu May 15, 2008 5:26 am
Reply with quote

gcicchet wrote:
even a scheduling tool would not fix this problem, how would you prevent step2 from executing?
No imagination?
Think about what the OP is trying to do, imagine a solution....
It's fun to play with problems as they 'stage' in your mind.....grin.....
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu May 15, 2008 11:28 am
Reply with quote

Make it all one biggggggggggggggg jobby and use conditional execution
Back to top
View user's profile Send private message
tchen40

New User


Joined: 12 Sep 2007
Posts: 30
Location: Los Angeles, Ca

PostPosted: Thu May 15, 2008 10:32 pm
Reply with quote

What we have currently is -

Job A will submit jobs B and C. We want job C to run based on conditions from B.

My solution is have job A submit job B... The submission of job C is a step in job B and that step that'll submit the job has the COND parm in it coded for whatever condition it is that you'll want job C to run.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu May 15, 2008 11:31 pm
Reply with quote

Hello,

What is the reason for these jobs submitting each other?

Sounds like a single job with proper conditon code testing would work just fine icon_confused.gif
Back to top
View user's profile Send private message
tchen40

New User


Joined: 12 Sep 2007
Posts: 30
Location: Los Angeles, Ca

PostPosted: Thu May 15, 2008 11:43 pm
Reply with quote

well, as I understand it... Job A curently submits B and C... veena_nagesh2002 wants job C submitted conditional of the RC of job B. How can job A know what the return code of job B is ? Not to mention we don;t even know how ling it would take job B to finish.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu May 15, 2008 11:48 pm
Reply with quote

Hello,

Quote:
How can job A know what the return code of job B is ? Not to mention we don;t even know how ling it would take job B to finish.
If this was implemented as a single job with condition code testing, it would not matter. Step(s)A would run, then step(s)B, then step(s)C as determined by the COND= testing all within the same job.

Just because something runs "some way", does not mean it has to run that way forever. If the requirement has changed or is now better understood, it may make good sense to modify the process.
Back to top
View user's profile Send private message
tchen40

New User


Joined: 12 Sep 2007
Posts: 30
Location: Los Angeles, Ca

PostPosted: Fri May 16, 2008 12:07 am
Reply with quote

veena_nagesh2002 wrote:
Is it possible to execute the step2 based on completion of job (RC) which is submitted in the prior step. if so can some body provide me the details


I don't believe you understand what's required here. Veena doesn't care about the step that submits the job. It's always going to be 0. Then step 3 which submits job C will always run.

He wants to have job C submitted based on the return codes that job B gets. not what the step that submitted job B gets (which will always be 0). And I'll bet without even knowing what it is that job B does, step 3 would've already submitted job C before job B is even done.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri May 16, 2008 12:15 am
Reply with quote

Hello,

Quote:
I don't believe you understand what's required here.
Sorry, but i believe i completely understand what is needed - at least from a business perspective.

What i do not understand is the stubbornness (not Veena's - no response for a while from Veena, but yours) to maintain/implement the 3 job architecture. I see no real reason to try to dance around the current issue. If all is done in one job, all of the "scheduling" issues go away.

Maybe Veena will explain why there is a need to run 3 separate jobs. . . If not, it is all just speculaton.
Back to top
View user's profile Send private message
veena_nagesh2002
Warnings : 1

Active User


Joined: 07 May 2005
Posts: 110
Location: hyderabad

PostPosted: Mon May 26, 2008 2:26 pm
Reply with quote

sorry for late reply.

This is production requirement only. more over we have schedular job which submits the jobs one after the other based status of the incoming files. To be clear the job A will submit job B and C in two different steps i would like to execute step2 of job A needs to executed based on the return code of job B but not the step 1 of job A.

let me know if you need more details
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon May 26, 2008 7:22 pm
Reply with quote

Hello,

Quote:
To be clear the job A will submit job B and C in two different steps i would like to execute step2 of job A needs to executed based on the return code of job B but not the step 1 of job A
Sorry, this is not clear. . Please re-read what you posted and clarify.

Quote:
let me know if you need more details
I still see no reason for the convoluted solution (i'm probably missing something). Why can this not be done in a single job with the proper conditon code testing? That it has already been set up as 3 jobs is not a "why". What technical or business reason is there for 3 jobs?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
Search our Forums:

Back to Top