View previous topic :: View next topic |
Author |
Message |
deepeshk79 Beginner
Joined: 20 Jun 2003 Posts: 112 Topics: 48 Location: Bangalore
|
Posted: Mon Oct 06, 2003 1:53 am Post subject: TSO SUB |
|
|
Hi all,
I tried the following code
Code: |
ADDRESS TSO "SUB 'PDSONE.JCLS(JCLONE)' "
SAY RC
IF RC = 0 THEN
ADDRESS TSO "SUB 'PDSONE.JCLS(JCLTWO)' "
EXIT 0
|
The rexx routine executes both these jcls irrespective of the return code of JCLONE, but i need to execute JCLTWO only if JCLONE is successful(RC=0)
Any thoughts???
Thanks,
Deepesh |
|
Back to top |
|
 |
coolman Intermediate
Joined: 03 Jan 2003 Posts: 283 Topics: 27 Location: US
|
Posted: Mon Oct 06, 2003 2:04 am Post subject: |
|
|
Deepesh,
I guess you had got it wrong. "RC" gives the return code based on whether the previous submit statement had executed sucessfully or not. It does not know/need not bother to know the return code of the job, that was in turn submitted. If you would need to find the return code of the job that was submitted, you can do either of the following :
1. Use Wait logic in your program(*not warranted*)
2. Chase control blocks.(Do a search for it)
Hope this helps...
Cheers,
Coolman.
________
EXTREME Q VAPORIZER
Last edited by coolman on Sat Mar 12, 2011 8:32 pm; edited 1 time in total |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Mon Oct 06, 2003 5:30 am Post subject: |
|
|
deepeshk79,
A simple way to solve the problem is to append a step to your JCLONE job which will submit the JOB 2
ex:
Code: |
//LASTSTEP EXEC PGM=IKJEFT01,
// PARM='SUBMIT PDSONE.JCLS(JCLTWO)'
//SYSTSPRT DD SYSOUT=*
|
or
Code: |
//LASTSTEP EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=PDSONE.JCLS(JCLTWO),DISP=SHR
//SYSUT2 DD SYSOUT=(*,INTRDR)
|
If you still insist on checking on the RC in rexx itself you can go with the options suggested by coolman.
The following topic covers the extraction of return code using rexx
http://www.mvsforums.com/helpboards/viewtopic.php?t=44
Hope this helps...
cheers
kolusu |
|
Back to top |
|
 |
deepeshk79 Beginner
Joined: 20 Jun 2003 Posts: 112 Topics: 48 Location: Bangalore
|
Posted: Mon Oct 06, 2003 6:41 am Post subject: |
|
|
Hi Kolusu and Coolman,
Thanks for your help. I will prefer to have Internal Reader than Rexx.
Deepesh |
|
Back to top |
|
 |
|
|