View previous topic :: View next topic
|
Author |
Message |
Suneetha1612
New User
Joined: 03 Jan 2008 Posts: 7 Location: Bangalore
|
|
|
|
Hi,
I have a requirement of submiting a REXX code through JCL. I need to check a condition in it, based on that i have to cancel the job which has submitted it by taking the Job number. Can you please help me to get the Job number of the JCL which has submitted it(REXX code)?
Regards,
Suneetha.
Make your own destiny, Don't wait for it to come to you. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Your requirement is confusing
what do you mean by "SUBMITTING"
do You have two jobs or what You call submitting is just the execution of a rexx script inside one job..
1) two jobs ... it' s illogic/wrong call it any way You want
to expect that the father ( submitter ) will sit there waiting to be canceled
--- the process is chose one -a)wrong b)badly described
2) one job with a step executing a rexx script,
in this case the best thing to do is to exit with a return code and put a "cond"
on the subsequent steps |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Found this on the internet:
REXX:
Code: |
/* REXX */
TCB = PTR(540)
TIOT= PTR(TCB+12)
JNAM= STG(TIOT,8)
SNAM= STG(TIOT+8,8)
PSNAM = STG(TIOT+16,8)
JSCB= PTR(TCB+180)
PNAM= STG(JSCB+360,8)
SSIB= PTR(JSCB+316)
JNUM= STG(SSIB+12,8)
SAY 'JOB NAME:' JNAM
SAY 'PROC STEP NAME:' PSNAM
SAY 'STEP NAME :' SNAM
SAY 'PROGRAM NAME:' PNAM
SAY 'JOB NUMBER:' JNUM
EXIT(0)
PTR: RETURN C2D(STORAGE(D2X(ARG(1)),4))
STG: RETURN STORAGE(D2X(ARG(1)),ARG(2))
|
Found this is a previous topic:
COBOL:
See this previous topic. |
|
Back to top |
|
|
Suneetha1612
New User
Joined: 03 Jan 2008 Posts: 7 Location: Bangalore
|
|
|
|
Hi Kevin,
Thanks a lot. The code which you have given is working. Thanks for your quick reply.
Regards,
Suneetha. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
|