Page 1 of 1

Pass Value from program to JCL

PostPosted: Thu Sep 03, 2009 10:56 pm
by kashmiri
I have a simple question;
How do i pass a value that gets stored in a program variable to JCL. Or, is there a way I can make changes in a panel and they then get reflected in the JCL that I submit?
e.g if I have a job that I submit daily, but before submitting I need to change the date somewhere in the JCL. I do that by saying on command line " C all 2009 2008"
e.g..... can I do this by taking the date in my program and that will automatically change the date inside JCL..

Thanks!

Re: Pass Value from program to JCL

PostPosted: Thu Sep 03, 2009 11:58 pm
by MrSpock
Your topic is a bit confusing. Why do you find it necessary to edit the JCL everytime and then submit it? Can't you use some other method of providing the varaiable values? Can't it get the changes from a dataset of some sort? I suspect that the question you're not really asking is, can you make changes to an application running on TSO that affect a running job? The answer is no. Batch and TSO are two seperate address spaces and have no relationship with each other.

Anyway, you haven't told us what your real goal is. Can you have a program that runs in TSO and calls a panel where you can enter your changes? Sure. What do you want it to do then? You could have your program edit the JCL, apply your changes, and then submit it. Or you could use ISPF File Tailoring Services to build JCL with the changes added dynamically.

Re: Pass Value from program to JCL

PostPosted: Fri Sep 04, 2009 3:39 pm
by kashmiri
I am really very sorry. I actually wanted to pass value from REXX program to JCL.
All i am doing is that from my rexx program i am submitting a JCL. But I want my rexx program to ask me for my LOGIN ID and then it should automatically change that in accounting information. And every time i submit my jcl there is a date written in the JCL. I always change the date by issuing the command "c all 20 30".
Can i accomlish this in rexx only, i.e i should execute rexx, it should ask me my login id and date, then it should do those changes in the jcl and then submit it...


Thanks a lot... and i am really very sorry for ambigous post.

Re: Pass Value from program to JCL

PostPosted: Sat Sep 05, 2009 1:06 pm
by kashmiri
Is there anybody who can solve my above problem

Re: Pass Value from program to JCL

PostPosted: Sat Sep 05, 2009 1:16 pm
by expat
Both of the parameters you want are readily available to a REXX exec.

SYSUID = MVSVAR(SYSUID) gives the user id

And I'll let you go away and read all about the date function of REXX in the manuals.