View previous topic :: View next topic
|
Author |
Message |
theslaveofgod
New User
Joined: 16 Feb 2006 Posts: 5
|
|
|
|
hi,
I have submitted a job through rexx. The problem is that the rexx programe must wait and recieve the return code of that submitted job and then execute other operations in it. How to achieve this condition?? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Does your REXX exec trap the jobname and jobid (i.e. job number) of the job that was submitted? |
|
Back to top |
|
|
theslaveofgod
New User
Joined: 16 Feb 2006 Posts: 5
|
|
|
|
ya i am executing that job with a separate id which is trapped by the rexx |
|
Back to top |
|
|
amitava Warnings : 1 Active User
Joined: 30 Oct 2005 Posts: 186 Location: India
|
|
|
|
Hey theslaveofgod,
Please check the forum again. I have already posted the topic about how to control the JOB flow. Its very simple. And if u want the detail coding I will send u later |
|
Back to top |
|
|
martin9
Active User
Joined: 01 Mar 2006 Posts: 290 Location: Basel, Switzerland
|
|
|
|
instead of submitting a job,
call the program directly under rexx,
allocate all neccessary datasets first
using the tso-services (i.e. address tso),
then you will also receive a return code,
without leaving your main program...
martin9 |
|
Back to top |
|
|
theslaveofgod
New User
Joined: 16 Feb 2006 Posts: 5
|
|
|
|
hi martin
i am actually running the jcl in the method what you have said but the problem is how to recieve the return codes. The rexx doesnt wait for the execution of jcl. it ends before the job get submitted and return codes are produced |
|
Back to top |
|
|
martin9
Active User
Joined: 01 Mar 2006 Posts: 290 Location: Basel, Switzerland
|
|
|
|
hy,
no no no, you did not understand.
first, i assume you have a jcl with one step and you
want further processing depending on the result (i.e. RC=0).
therefore don't start any jcl, instead ...
rexx code...
.
.
address tso
alloc dd(sysin) ...
alloc dd(sysprint) ... and so on...
call *(pgm)
if rc = 0 then further processing
.
.
exit 0
you do all thru rexx!
if you have a jcl with several steps, we should consider
any other solution, for example run everything in batch.
martin9 |
|
Back to top |
|
|
|