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

How to cancel the Job through REXX


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Suneetha1612

New User


Joined: 03 Jan 2008
Posts: 7
Location: Bangalore

PostPosted: Mon Jan 07, 2008 5:44 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Mon Jan 07, 2008 5:55 pm
Reply with quote

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
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Mon Jan 07, 2008 5:58 pm
Reply with quote

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
View user's profile Send private message
Suneetha1612

New User


Joined: 03 Jan 2008
Posts: 7
Location: Bangalore

PostPosted: Mon Jan 07, 2008 8:40 pm
Reply with quote

Hi Kevin,

Thanks a lot. The code which you have given is working. Thanks for your quick reply.

Regards,
Suneetha.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Mon Jan 07, 2008 8:52 pm
Reply with quote

Ah Ha!

I finally found the post I was looking for on this same topic:

ibmmainframes.com/about11391.html
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top