View previous topic :: View next topic |
Author |
Message |
subhi_dhanbad Beginner
Joined: 30 Sep 2005 Posts: 3 Topics: 2
|
Posted: Tue Dec 06, 2005 2:05 am Post subject: Replacing variables in a job thru REXX |
|
|
Hi ,
I am writing a REXX program.
The details are as below :-
1. I am taking some input from users. Say STRING
2. Now I want to replace a variable XXXXX present in a job with this string.
3. After that I have to submit the job thru REXX.
How can I do point no. 2 given above.
Can anyone give me some idea or sample codes for it ?
Thanks,
Subhi. _________________ Regards,
Subhi B. |
|
Back to top |
|
|
ofer71 Intermediate
Joined: 12 Feb 2003 Posts: 358 Topics: 4 Location: Israel
|
Posted: Tue Dec 06, 2005 3:17 am Post subject: |
|
|
Just generate the JCL's lines in your REXX, and then submit it from within the REXX, using the SUBMIT command.
O.
________
herbalaire
Last edited by ofer71 on Sat Feb 05, 2011 11:24 am; edited 1 time in total |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Tue Dec 06, 2005 4:26 am Post subject: |
|
|
Subhi_dhanbad,
The simplest way is to use ISPF File Tailoring Skeletons. Very simple to use. Just create the template jcl and store in a PDS. The difference b/w a normal jcl and Skeleton jcl are
1. Prefix an '&' for all Strings you would like to be overridden using REXX. for example, if you want to change a variable XXXXX just change it to '&XXXXX' - something like Symbolic parameter.
2. If there are any other JCL symbolic parameters already present, you need to put two '&&' instead of one '&'.
3. Allocate this JCL library to a DD Name called "ISPSLIB" in your REXX program.
4. Using FTOPEN, FTINCLUDE and FTCLOSE commands, you can open the skeleton JCL, perform symbolic overrides via REXX, save it to a temporary dataset and submit the job.
Example: http://mvsforums.com/helpboards/viewtopic.php?p=16078#16078
http://mvsforums.com/helpboards/viewtopic.php?t=42&highlight=rexx+file+tailoring
For more instructions on File Tailoring Skels, Check the following links.
http://mvsforums.com/helpboards/viewtopic.php?t=3642&highlight=rexx+file+tailoring
http://mvsforums.com/helpboards/viewtopic.php?t=5273&highlight=rexx+file+tailoring
Hope this helps,
Cheers,
Phantom |
|
Back to top |
|
|
warp5 Intermediate
Joined: 02 Dec 2002 Posts: 429 Topics: 18 Location: Germany
|
Posted: Wed Dec 07, 2005 3:14 am Post subject: |
|
|
You can just use edit macros to edit the job before you submit it. Here is an example that we use:
Code: |
/* REXX Sysvarch Macro sysvars ersetzen */
'ISREDIT MACRO'
address ispexec 'TBOPEN FPVARS NOWRITE SHARE'
address ispexec 'TBGET FPVARS'
i = 0
do fpvar0
i = i + 1
interpret "parse var fpvar"i "parm'='pwert'/*'."
call xch parm pwert "ALL"
end
address ispexec 'TBCLOSE FPVARS'
exit
xch:
parse arg var1 var2 var3
hx1 = c2x(var1)
hx2 = c2x(var2)
address isredit "C X'"hx1"' X'"hx2"'" var3
return
|
|
|
Back to top |
|
|
subhi_dhanbad Beginner
Joined: 30 Sep 2005 Posts: 3 Topics: 2
|
Posted: Thu Dec 08, 2005 6:05 am Post subject: |
|
|
Thanx a lots for ur replies.
Cheers,
Subhi. _________________ Regards,
Subhi B. |
|
Back to top |
|
|
|
|