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

Passing parameters to a jcl submitted through REXX.


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
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
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

Global Moderator


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

PostPosted: Tue Apr 28, 2009 6:03 pm
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
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: 8797
Location: Welsh Wales

PostPosted: Tue Apr 28, 2009 6:33 pm
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
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

Global Moderator


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

PostPosted: Tue Apr 28, 2009 7:06 pm
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
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

Global Moderator


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

PostPosted: Wed Apr 29, 2009 6:52 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


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