Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Passing parameters to a jcl submitted through REXX.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
Roshnii

New User


Joined: 30 Sep 2008
Posts: 45
Location: bangalore

PostPosted: Tue Apr 28, 2009 6:01 pm    Post subject: Passing parameters to a jcl submitted through REXX.
Reply with quote

I am submitting a job using REXX.
I am using this command
Code:

ADDRESS TSO "SUBMIT <dsn name (member)'"

I want to know how do I pass the parameters to the JCl?

Any help?
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: Tue Apr 28, 2009 6:03 pm    Post subject: Reply to: Passing parameters to a jcl submitted through REXX
Reply with quote

You don't. JCL doesn't take parameters.

And, for the sake of accuracy, you're not submitting a job using REXX. You're submitting a job using TSO.
Back to top
View user's profile Send private message
Roshnii

New User


Joined: 30 Sep 2008
Posts: 45
Location: bangalore

PostPosted: Tue Apr 28, 2009 6:30 pm    Post subject:
Reply with quote

Thanks.
So is there any way that I can pass file names to the jcl that i will submitting through TSO? using any other command for submitting the job?



Thanks,
Roshnii
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Apr 28, 2009 6:33 pm    Post subject:
Reply with quote

Please explain exactly what you require and maybe we can help you better
Back to top
View user's profile Send private message
Roshnii

New User


Joined: 30 Sep 2008
Posts: 45
Location: bangalore

PostPosted: Tue Apr 28, 2009 6:43 pm    Post subject:
Reply with quote

I need to submit a job to copy the protsym from one region to another region.
I have the job ready and it works. But depending on the regions where I need to move and to which region I need to move, the Dsname changes.
So I wanted to know, if it is possible to pass the dsnames to the jcl before submitting it.
And I have to use rexx for the entire operation.

I hope its not confusing.
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: Tue Apr 28, 2009 7:06 pm    Post subject: Reply to: Passing parameters to a jcl submitted through REXX
Reply with quote

I'm moving this out of the REXX forum since your problem and potential solution isn't really REXX-related.

I see some options you may want to consider:


- you can edit the JCL, make the changes to the datasets as needed, then save it and submit it.

- you can read the JCL into a REXX stem variable. Then, make the changes to the dataset names as needed. Push the stem variables into the stack, and use the TSO SUBMIT command to submit the JCL from the data stack rather than from a dataset.

- you can use ISPF File Tailoring services to generate and submit the appropriate JCL.

- you can use JCL SET, INCLUDE, and/or Procedures to specify the dataset names as needed.
Back to top
View user's profile Send private message
Roshnii

New User


Joined: 30 Sep 2008
Posts: 45
Location: bangalore

PostPosted: Wed Apr 29, 2009 5:51 pm    Post subject: Reply to: Passing parameters to a jcl submitted through REXX
Reply with quote

thanks for the soultions.

I am trying this approach.

- copied the jcl to a flat file.
- use 'change all' command to replace the member and pds
- submit the jcl

But how do I issue the change all command for the flat file inside the rexx program?
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: Wed Apr 29, 2009 6:52 pm    Post subject: Reply to: Passing parameters to a jcl submitted through REXX
Reply with quote

Presuming you're running the REXX exec from within TSO, then you can use TSO commands from within the exec the same way you do natively.

In your case, I just tried this code as a test:

Code:

/* REXX */
...
Queue "TOP"
Queue "C * 999999 /OLD/NEW/"
Queue "END SAVE"
"EDIT YOURDSN CNTL NONUM OLD"
...


and it worked just fine.
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Wed Apr 29, 2009 8:08 pm    Post subject:
Reply with quote

If you need to change all occurrences add ALL to the CHANGE sub command of EDIT.
Code:
Queue "C * 999999 /OLD/NEW/ ALL"
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 -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 47 Fri Sep 29, 2017 1:08 pm
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us