View previous topic :: View next topic
|
Author |
Message |
rashmi1482
New User
Joined: 22 May 2007 Posts: 3 Location: Bangalore
|
|
|
|
Hi,
I want to create a REXX tool change a prod jcl to test jcl by changing some jcl parameters and passing some symbolic parameters to the jcl. I want to pass an environment variable and jobname from an ispf panel and then the REXX tool should make the appropriate changes to the prod
jcl.
Also I want to read each line of a proc and if a parmlib member is encountered , the tool should go to the parmlib and search in the member for a string, if found the parmlib should be changed and a symbolic parameter should be introduced for the same in proc.
Also some steps should be commented out based on a parmlib member and exec pgm.
Please let me know if there is anyway of doing this thru REXX.
Also please send me the link of some rexx tool development materials.
Thanks,
Rashmi |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
Back to top |
|
|
rashmi1482
New User
Joined: 22 May 2007 Posts: 3 Location: Bangalore
|
|
|
|
Hi,
Could you helpme on how to go about reading each line of a jcl with REXX because this the first thing that needs to be implemented in my case.
My idea is
1. Ge to the job name and the environmnet name from a panel.
2. Go to the job and make changes depending on the environment using rexx.
3. For this read line by line of jcl and make changes to the required parameters.
Please help me on how to read line by line of the jcl. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
If You are so new to rexx that You cannnot read a line from a pds member or sequential dataset,
it would be wiser to review You planning in order to provide time for training.
I posted the link to the docs, You might also search the forums for "EXECIO",
You will find lots of samples and hints on reading
( also on using edit macros to achieve what You want )
I do not judge I state
why everybody wants to build tools without having the basic skills ?? |
|
Back to top |
|
|
mtaylor
Active User
Joined: 20 Feb 2009 Posts: 108 Location: Kansas City
|
|
|
|
This topic comes up pretty frequently. What the op is asking for is a tool to refactor jcl. My question is; why rexx on the mainframe? Why not transfer the jcl to a pc, do the changes there, and transfer back to the mainframe? Then you have access to all the tools and languages in the pc world like python etc and aren't limited to only rexx? |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
mtaylor wrote: |
This topic comes up pretty frequently. What the op is asking for is a tool to refactor jcl. My question is; why rexx on the mainframe? Why not transfer the jcl to a pc, do the changes there, and transfer back to the mainframe? Then you have access to all the tools and languages in the pc world like python etc and aren't limited to only rexx? |
- You aren't limited to just Rexx on the mainframe, although 90% of the posters here have apparently only ever heard of "Rexx" and "JCL".
- That same 90% would be pressed to their limits to do that transfer once. Asking them to automate it for hundreds of data sets transferred and modified by dozens of users would reduce them to tears of frustration.
- Hi, Opal!
|
|
Back to top |
|
|
valyk
Active User
Joined: 16 Apr 2008 Posts: 104 Location: South Carolina
|
|
|
|
It just so happens that I had a need to do something very similar for our CICS regions:
Code: |
/* Search proc for parmlib */
READ_PROC:
ADDRESS TSO
"ALLOC DATASET('"INPROC"("IN_NAME")') FILE(INPROC) SHR"
"EXECIO * DISKR INPROC (FINIS STEM INPROC."
"FREE FILE(INPROC)"
DO I = 1 TO INPROC.0
IF POS('PARMLIB('||OUT_NAME,INPROC.I) > 0 THEN DO
PARSE VAR INPROC.I 'DSN=' INPARM '('
CALL READ_PARM
END
END
RETURN
/* Read parmlib and search for GRPLIST parameters */
READ_PARM:
ADDRESS TSO
"ALLOC DATASET('"INPARM"("IN_NAME")') FILE(INPARM) SHR"
"EXECIO * DISKR INPARM (FINIS STEM INPARM."
"FREE FILE(INPARM)"
DO I = 1 TO INPARM.0
IF POS('GRPLIST=(',INPARM.I) > 0 THEN
PARSE VAR INPARM.I 'GRPLIST=(' IBMLIST ',' PRODUCT ',' JOB ')' .
END
RETURN
|
|
|
Back to top |
|
|
|