Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

REXX Tool for converting a production JCL to test JCL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
vickey_tcs

New User


Joined: 14 Mar 2009
Posts: 5
Location: At Desk

PostPosted: Thu May 07, 2009 12:32 pm    Post subject: REXX Tool for converting a production JCL to test JCL
Reply with quote

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
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Thu May 07, 2009 12:52 pm    Post subject: Reply to: REXX Tool for converting a production JCL to test
Reply with quote

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
http://ibmmainframes.com/viewtopic.php?t=32494&highlight=jcl+rexx
but as I said the skills needed are better than average
Back to top
View user's profile Send private message
Peter Poole

New User


Joined: 07 Jan 2009
Posts: 50
Location: Scotland

PostPosted: Mon May 25, 2009 8:44 pm    Post subject:
Reply with quote

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
View user's profile Send private message
leninmathangi

New User


Joined: 10 Sep 2008
Posts: 11
Location: Chennai - India

PostPosted: Tue May 26, 2009 2:15 pm    Post subject: Reply to: REXX Tool for converting a production JCL to test
Reply with quote

Hi Vicky,

Im also working on the same icon_sad.gif

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
View user's profile Send private message
Peter Poole

New User


Joined: 07 Jan 2009
Posts: 50
Location: Scotland

PostPosted: Tue May 26, 2009 7:25 pm    Post subject:
Reply with quote

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
View user's profile Send private message
harithb

New User


Joined: 08 Jun 2009
Posts: 15
Location: Bangalore

PostPosted: Mon Jun 08, 2009 4:26 pm    Post subject: Reply to: REXX Tool for converting a production JCL to test
Reply with quote

Hi...

Has somebody completed this tool.. If yes, can anybody share the code.. I also have to work on the same.. icon_sad.gif

Thanks.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Jun 08, 2009 4:34 pm    Post subject: Re: Reply to: REXX Tool for converting a production JCL to t
Reply with quote

harithb wrote:
Hi...
Has somebody completed this tool.. If yes, can anybody share the code.. I also have to work on the same.. icon_sad.gif
Thanks.

What have you accomplished so far on your own ?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Mon Jun 08, 2009 6:21 pm    Post subject: Reply to: REXX Tool for converting a production JCL to test
Reply with quote

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
http://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
View user's profile Send private message
deveshyahoo

New User


Joined: 28 Jan 2008
Posts: 10
Location: noida

PostPosted: Wed Jun 10, 2009 1:55 pm    Post subject:
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Wed Jun 10, 2009 2:07 pm    Post subject: Reply to: REXX Tool for converting a production JCL to test
Reply with quote

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
View user's profile Send private message
hrsuprith

New User


Joined: 13 Sep 2008
Posts: 6
Location: bangalore

PostPosted: Mon Sep 28, 2009 8:56 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Mon Sep 28, 2009 9:26 pm    Post subject: Reply to: REXX Tool for converting a production JCL to test
Reply with quote

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
View user's profile Send private message
GaneshKarunyarajan

New User


Joined: 12 Apr 2005
Posts: 13

PostPosted: Fri Oct 02, 2009 12:57 am    Post subject:
Reply with quote

Vickie,

I just finished my Phase I of Prod JCL Conversion here. You compeleted or still working thru?

Rgs,
Ganesh.K
Back to top
View user's profile Send private message
radhikavasu

New User


Joined: 11 Nov 2008
Posts: 4
Location: USA

PostPosted: Tue Oct 13, 2009 1:43 am    Post subject:
Reply with quote

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
View user's profile Send private message
hrsuprith

New User


Joined: 13 Sep 2008
Posts: 6
Location: bangalore

PostPosted: Tue Nov 17, 2009 2:57 pm    Post subject: Use ISREDIT & hardcode in a JCL
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
No new posts COOLGEN - TSO TEST FACILITY indianrajput CA Products 4 Wed Nov 02, 2016 9:28 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
This topic is locked: you cannot edit posts or make replies. Need to code a Rexx PGM sundaram.naveen CLIST & REXX 18 Thu Oct 06, 2016 6:45 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us