View previous topic :: View next topic
|
Author |
Message |
Digvijay Singh
Active User
Joined: 20 Apr 2022 Posts: 148 Location: India
|
|
|
|
Code: |
[code]//S0 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT2 DD DISP=SHR,DSN=statds
//SYSUT1 DD *
INIT
//*
//ENBP1000 EXEC PGM=whatever
//*
// IF ENBP1000.RC = 0 THEN
//S1 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT2 DD DISP=SHR,DSN=statds
//SYSUT1 DD *
OK
// ELSE
//S2 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT2 DD DISP=SHR,DSN=statds
//SYSUT1 DD *
FAIL
// ENDIF
//* [code][/code][/code]
I found this approach better , anyone has any suggestion not tried yet but would like to go with this approach which i also had since i started thinking to resolve this proble.
Thanks WJ
Thank you all for help , good discussion learnt few things from here. |
|
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2141 Location: USA
|
|
|
|
It's up to you, but you continuously ignore all advices to eliminate your senseless approach to run two asynchronous processes for simple sequential operations.
All your efforts are required only to provide synchronization (a stupid one) between your parallel processes.
As you were told several times, you cannot predict the actual behavior of your first submitted job; it could not start at all (for 100 reasons), it can be cancelled by administration, it can fail in the middle (for 1,000,000 different reasons). In any of those cases your "job scheduling" REXX code is doomed to wait forever...
The main issue is: this is absolutely unneeded activity for your extremely simple and primitive original task. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
One easy way to fix this is to move step 2 from main job into that random submitted job as a last step in it and there you could check RC if the previous step ( previous step of that random job) to control this step2s execution.
Topic will be locked soon .. |
|
Back to top |
|
|
Digvijay Singh
Active User
Joined: 20 Apr 2022 Posts: 148 Location: India
|
|
|
|
Thanks all,
only thing i wanted to avoid lot of changes in rexx which is submitting the internal job and there are amy conditon on which a final jcl card has been prepared (internal job), thats why its bit difficult.
I have also this approach to change the random job name to a constant and captue the log of this job from Savers and all using $averpull utility and all.
I will capture the log(RC of job ) in a file and accordingly i will execute the 2nd step of my main job.
you may think i am stupid but just had this idea so i shared. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2594 Location: Silicon Valley
|
|
|
|
note: I do not know anything about Savers.
Quote: |
change the random job name to a constant and capture the log of this job from Savers |
But it is your rexx that creates the job name. After creating the job name, just save the name to a file so that, knowing the job name, you can use Savers to retrieve the output.
Earlier, I had asked how you submitted the job. You did not answer. But my suggestion was to use OUTTRAP to capture the message returned from a SUBMIT command. I think it will have the job number, which I think you might also use to retrieve output. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2594 Location: Silicon Valley
|
|
|
|
Quote: |
you may think i am stupid |
You are not stupid... just inexperienced, which is why you are asking questions here. But it is not clear why you refuse the best advice. |
|
Back to top |
|
|
|