View previous topic :: View next topic
|
Author |
Message |
vickey_tcs
New User
Joined: 14 Mar 2009 Posts: 5 Location: At Desk
|
|
|
|
Hi I m new to REXX and would like to create a tool to convert a production JCL to test JCL by using a REXX Tool.
The following are the requirements
1.have to Read the JCL line by line
2. Search for DSN=File Name, check of the File name is a PDS or a PS. If its a PDS it means its a library something like Loadlib, Cntllib, SMTPlib etc. If its a PS (GDG or Flat file), it means its an input or output file. For Input and Output change the file name with RACF id somewhere in between so that it becomes a test file.
3. If the file is a GDG , create a test GDG.
4. Check for PGM=, DFSR, BMP etc, and convert them to PGM=, IMSTBTCH accordingly.
5. If some of the files cannot be created because it exists accordingly, display all those file names with the line number on the screen.
6. When all is done, create a test JCL in a temporary dataset.
Could anyone help me out on this? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
do not expect any code!
start writing and if You have issues with Your coding somebody will be here to help
but, my personal opinion, the task is too challenging for REXX beginner
( asking for help when the requirements are not complete yet )
as a hint,
simple string matching will not be enough ( too many length changes )
You will have to write a jcl scanner/parser to provide for proper reformatting
You will have also to provide proper handling for user specified procedure parameters
and... and... and...
believe me, I know what You are talking about
for a snippet of a jcl scanner/parser look at
ibmmainframes.com/viewtopic.php?t=32494&highlight=jcl+rexx
but as I said the skills needed are better than average |
|
Back to top |
|
|
Peter Poole
New User
Joined: 07 Jan 2009 Posts: 50 Location: Scotland
|
|
|
|
Certainly anything that simplifies conversions from production to test and - eventually - implementations from test to production is a good thing, but a lot of what you would need to do will be very dependant on what the standards and conventions are at your particular shop.
Leaping gracefully over the dataset creation / environment set-up issues and focussing purely on the JCL, one thing I have seen work quite nicely is the concept of universal procs, where the catalogued procedures only change if necessary to add/remove datasets/parameters and all the distinctions between production and test are made by changes to symbolic parameters at job level; so if all production datasets and libraries begin P* and all test datasets and libraries begin T* then that's the only change that needs applied.
Unsurprisingly, things do tend to get a lot more complicated than that, particularly if you need multiple concurrent test streams and when it comes to granting RACF access, but you might want to approach it in terms of 'what are the differences' and 'what are the simplest rules can I automate to make the changes I need to'
Feel free to PM me if you'd like to discuss further.
Cheers. |
|
Back to top |
|
|
leninmathangi
New User
Joined: 10 Sep 2008 Posts: 11 Location: Chennai - India
|
|
|
|
Hi Vicky,
Im also working on the same
The customization is a time consuming process and this will make your effort very less. I would like to write down the algorithm/procedure which im working here. We have just started the flow.
1.JCL changes - Probably changes in JCL might not be a bigger one. We need to modify the load libs accordingly and the calling procs should be routed to test PDS.
2.Proc identifier - this will help me to identify all the procs called in the jcl
3.Proc Changes - Plannig to write a macro to change the common things
4.Control card identifer - this will help to identify all the control cards used in the proc
5.Control card changes - Plannig to write a macro to change the common things
6.GDG identifier - this will help to identify all the GDG files used in the proc
7.GDD creation - i had it earlier. need to implement over here. This is also a simple macro.
As per my knowledge, these things are fine to attain the target.
As enrico said, i have posted my queries and got solved for this process. Im trying to work out on these.
Thanks - Lenin |
|
Back to top |
|
|
Peter Poole
New User
Joined: 07 Jan 2009 Posts: 50 Location: Scotland
|
|
|
|
OK, good stuff in there Lenin, but still likely to end up being site specific.
Keeping things generic, it's probably worth going through Design 101 and looking at what you're trying to deliver at the end of the day.
Do you want a tool that you can point at one production job and have it spit out JCL and/or datasets to allow test running of that entire job? Or are we looking at something larger scale, wider reaching, and heading off towards the Managed Test Environment scenario? Is the emphasis on development or testing? (They're not the same thing!).
Personally, I'm always inclined to seperate the JCL analysis and conversion from the dataset creation and population processes. By all means parse the JCL to get a list of DSNs, but use that as an input driver list to a seperate tool.
It may also be worthwhile seeing if you have access to a product like JCLPREP where you can get a copy of the runtime JCL after it's been through interpretation and all nested procedures and symbolic replacements have been done.
Cheers. |
|
Back to top |
|
|
harithb
New User
Joined: 08 Jun 2009 Posts: 15 Location: Bangalore
|
|
|
|
Hi...
Has somebody completed this tool.. If yes, can anybody share the code.. I also have to work on the same..
Thanks. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
harithb wrote: |
Hi...
Has somebody completed this tool.. If yes, can anybody share the code.. I also have to work on the same..
Thanks. |
What have you accomplished so far on your own ? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
Quote: |
Has somebody completed this tool.. If yes, can anybody share the code.. I also have to work on the same.. |
such request is a bit unreasonable
such a tool would not be a few minutes effort, and it will certainly be mission critical.
furthermore....
generally code developed on the employer equipment and employer time belongs... to the employer
most probably posting such code would be against the poster business conduct guidelines
as a sample on how to analyze a jcl stream ( jcl scanner/parser ) look at
ibmmainframes.com/viewtopic.php?t=32494&highlight=jcl+rexx
but the skills needed are better than average
I wrote it, but anybody can learn from it |
|
Back to top |
|
|
deveshyahoo
New User
Joined: 28 Jan 2008 Posts: 10 Location: noida
|
|
|
|
Seems like lot of ppl are working on same/similar requirements.
i made similar stuff 2 quaters ago and its working fine.
A few things that i noticed and would like to change in V1.2 are:
1. Better use ISREDITS to search and change as the line by line scaning is time consuming and cumbersome.
2. add an option of converting a catalog proc to instream proc on accepting DSN names fron user.
3. do a reverse process of converting a jcl from dev to production format.
i know it sounds like i am just adding to your list of requirements. But it will be easier to achieve these if you plan about them rt now then later. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10872 Location: italy
|
|
|
|
Quote: |
3. do a reverse process of converting a jcl from dev to production format. |
if the process has been properly designed no need to have a specific approach
unless You have the naming conventions hardcoded there should be no problem
converting from a naming convention to a different one
a <few> external parameters table would be enough for
- changes, delete, add
categorized by
- generic string
- parameter
- dataset name
- JCL keyword
- JCL statements
- algorithmic changes for the allocation parameters
( absolute, percentage, optimization)
- algorithmic changes for device conversion
- JCL related
- DATA related ( IDCAMS control statements for example) |
|
Back to top |
|
|
hrsuprith
New User
Joined: 13 Sep 2008 Posts: 6 Location: bangalore
|
|
|
|
vicky send me the description & also the primary qualifiers ..to my
email yahoo.co.in / gmail - e-addr removed
Do not post e-mail addresses on the forum. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
Quote: |
Do not post e-mail addresses on the forum.
|
There is a 'private messages' button at the top of the page. |
|
Back to top |
|
|
GaneshKarunyarajan
New User
Joined: 12 Apr 2005 Posts: 13
|
|
|
|
Vickie,
I just finished my Phase I of Prod JCL Conversion here. You compeleted or still working thru?
Rgs,
Ganesh.K |
|
Back to top |
|
|
radhikavasu
New User
Joined: 11 Nov 2008 Posts: 4 Location: USA
|
|
|
|
Hi I have the code try this.
You have to give each and every word what you want to change from prod to test
Suppose Job card in production has ABC and in test if you need as XYZ then
/* ReXX */
/* In ISPF DEFINE CHNGMAC MACRO */
/* trace r */
"ISREDIT MACRO"
chgcount = 0
"ISREDIT CHANGE ALL 'ABC' 'XYZ' "
if RC = 0 then chgcount = chgcount + 1
"ISREDIT CHANGE ALL 'aaa' 'bbb' "
if RC = 0 then chgcount = chgcount + 1
.
.
.
.
.
/* you can give all the fields what all you want to change */
if chgcount > 0 then
ZEDSMSG = chgcount ' changes made'
else
ZEDSMSG = 'Member not changed'
ADDRESS ISPEXEC "SETMSG MSG(ISRZ000)" /* Display messages.*/
EXit
/* "ISREDIT END" */
Let me know if it does not work.( delete the message step if not required) |
|
Back to top |
|
|
hrsuprith
New User
Joined: 13 Sep 2008 Posts: 6 Location: bangalore
|
|
|
|
Guys,
i had allrerady done this in my previous project.let me know if u need any help on this.
Regards, suprith |
|
Back to top |
|
|
|