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 submit a JCL thru REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
yogeshbabu

New User


Joined: 30 Nov 2005
Posts: 19
Location: India

PostPosted: Wed Mar 22, 2006 9:30 am    Post subject: How to submit a JCL thru REXX
Reply with quote

Hi all,

I need to submit a JCL thru REXX by overiding the file name every time. My requirement is like, I need to perform a string search in a PS and direct the search results to a PS. For that I want to create a JCL and invoke ISRSUPC utility (search) and override the PS filenames every time.
Can anyone help me in doing this ? Is there any other way of achieving the above requirement?

Thanks & Regards,
Yogesh
Back to top
View user's profile Send private message

KMK

New User


Joined: 29 Jul 2005
Posts: 18

PostPosted: Wed Mar 22, 2006 12:46 pm    Post subject:
Reply with quote

To submit JCL through REXX you can use the TSO command in REXX

ADDRESS TSO
"SUBMIT '<Dsn name>'"

This will submit the jcl present in the dsn.
Back to top
View user's profile Send private message
bonniem

New User


Joined: 09 Aug 2005
Posts: 67

PostPosted: Wed Mar 22, 2006 1:44 pm    Post subject:
Reply with quote

Create a rexx to create your search JCL taking the input and output dsns and search string as input. write the JCL into a PS of lrecl 80 and submit using tso sub '<PS name>'
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: Wed Mar 22, 2006 5:06 pm    Post subject: Re: How to submit a JCL thru REXX
Reply with quote

QUEUE the JCL records into the data stack. After the last record, QUEUE a terminator of "$$". Then, issue the TSO command "SUBMIT * END($$)":

Code:

QUEUE "//MYJOB JOB (...),CLASS=X,MSGCLASS=X"
QUEUE "//STEP1 EXEC PGM=ISRSUPC,..."
...
QUEUE "//*"
QUEUE "$$"
o = OUTTRAP("output.",,"CONCAT")       
"SUBMIT * END($$)"
o = OUTTRAP(OFF)                       
Back to top
View user's profile Send private message
yogeshbabu

New User


Joined: 30 Nov 2005
Posts: 19
Location: India

PostPosted: Wed Mar 22, 2006 8:06 pm    Post subject: Re: How to submit a JCL thru REXX
Reply with quote

Hi,

Thanks for you inputs. I am new to rexx. can you explain me the OUTTRAP in detail
o = OUTTRAP("output.",,"CONCAT")
o = OUTTRAP(OFF)


Thanks & Regards,
Yogesh
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: Thu Mar 23, 2006 1:47 am    Post subject: Re: How to submit a JCL thru REXX
Reply with quote

OUTTRAP is a TSO/E external function that traps output from commands.

See here for more details.
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 What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm


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