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: 10292
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: 4650
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: 4650
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. how to code for GDG in Rexx cvnlynn CLIST & REXX 13 Wed Aug 09, 2017 9:13 pm
This topic is locked: you cannot edit posts or make replies. rexx to create a tso command Bharath Vikraman CLIST & REXX 1 Tue Aug 08, 2017 3:32 pm
This topic is locked: you cannot edit posts or make replies. rexx code to create a ps file Bharath Vikraman CLIST & REXX 4 Mon Aug 07, 2017 10:30 am
No new posts Default Message in Rexx cvnlynn CLIST & REXX 9 Wed Aug 02, 2017 12:38 am
No new posts Calling CLIST through job and REXX Sahasra K CLIST & REXX 19 Tue Aug 01, 2017 10:25 am


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