Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to cancel the Job through REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: How to cancel the Job through REXX
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Mon Jan 07, 2008 5:55 pm    Post subject: Reply to: How to cancel the Job through REXX
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

Moderator Team Head


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

PostPosted: Mon Jan 07, 2008 5:58 pm    Post subject: Reply to: How to cancel the Job through REXX
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    Post subject:
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

Moderator Team Head


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

PostPosted: Mon Jan 07, 2008 8:52 pm    Post subject: Reply to: How to cancel the Job through REXX
Reply with quote

Ah Ha!

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

http://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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm
No new posts CICS START AND CANCEL blayek CICS 1 Wed Dec 07, 2016 3:27 am
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us