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
 

 

Modify control cards dynamically

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
jasorn

Active User


Joined: 12 Jul 2006
Posts: 153
Location: USA

PostPosted: Wed Jul 12, 2006 5:14 pm    Post subject: Modify control cards dynamically
Reply with quote

10+ years ago I created a generic process that allows you to parameterize 99% of your jcl including control cards. Using this method you can parameterize everything except the job card and an include member. This was before my *nix days so I didn't know about sed. But basically, the key to my process is a program that's kinda like a VERY simple version sed.

The neat thing about this is that you can run the exact same control cards and the exact same jcl except the control card in all environments instead of needing a copy for each, which is what I've seen in every shop I've worked in.

So far, every time I've introduced this to the 'gurus' at whatever place I'm working, I get the funny look and "you can't do that". But in fact where it's been used it works well and takes the sting out of doing things like changing a set of jobs to point to test instead of production, etc. Also, this allows for the jcl that gets to production to be the same jcl that has been used all the way from unit test.

My process is very simple and generic, and uses cobol instead of clist or rexx, that going from one environment to another takes a matter of minutes(assuming the naming conventions are reasonable). Plus it doesn't take some fancy syntax to learn like batch file-aide, etc.

I know there are all sorts of cool things you can do now(e.g. submit a job via ftp) that you couldn't do then.

My question is what methods have you seen to modify control cards 'on the fly'? Or is there even a utility now that does such a thing.
Back to top
View user's profile Send private message

jasorn

Active User


Joined: 12 Jul 2006
Posts: 153
Location: USA

PostPosted: Wed Jul 12, 2006 5:20 pm    Post subject: Re: Modify control cards dynamically
Reply with quote

jasorn wrote:
10+ years ago I created a generic process that allows you to parameterize 99% of your jcl including control cards. Using this method you can parameterize everything except the job card and an include member. This was before my *nix days so I didn't know about sed. But basically, the key to my process is a program that's kinda like a VERY simple version sed.

The neat thing about this is that you can run the exact same control cards and the exact same jcl except the control card

'control card' should be 'job card'
Quote:

in all environments instead of needing a copy for each, which is what I've seen in every shop I've worked in.

So far, every time I've introduced this to the 'gurus' at whatever place I'm working, I get the funny look and "you can't do that". But in fact where it's been used it works well and takes the sting out of doing things like changing a set of jobs to point to test instead of production, etc. Also, this allows for the jcl that gets to production to be the same jcl that has been used all the way from unit test.

My process is very simple and generic, and uses cobol instead of clist or rexx, that going from one environment to another takes a matter of minutes(assuming the naming conventions are reasonable). Plus it doesn't take some fancy syntax to learn like batch file-aide, etc.

I know there are all sorts of cool things you can do now(e.g. submit a job via ftp) that you couldn't do then.

My question is what methods have you seen to modify control cards 'on the fly'? Or is there even a utility now that does such a thing.
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Wed Jul 12, 2006 5:49 pm    Post subject:
Reply with quote

We developed the same tecnique here. We use it in our test environment to create multiple logical environments.

Using this method we can run the same job with multiple DB2 plans, CICS regions, SORT cards, ADABAS input parameters etc.

It was written in pure REXX, and it works great !!!

O.
Back to top
View user's profile Send private message
jasorn

Active User


Joined: 12 Jul 2006
Posts: 153
Location: USA

PostPosted: Wed Jul 12, 2006 6:00 pm    Post subject:
Reply with quote

ofer71 wrote:
We developed the same tecnique here. We use it in our test environment to create multiple logical environments.

Using this method we can run the same job with multiple DB2 plans, CICS regions, SORT cards, ADABAS input parameters etc.

It was written in pure REXX, and it works great !!!

O.


Yeah, I've seen REXX implementations. But the ones I've seen weren't generic and needed to be modified if something changed such as some new type of thing you'd want to use a parameter for.

And a downside is that I've on lots of projects where there weren't any rexx folks icon_smile.gif

But that's still a home grown solution like mine so maybe there isn't a better solution.

I'm curious though, does the method you use actually create different jobs, control cards, etc for each environment and those get executed? And if I made a job that used IROCK as a symobolic parameter that will have the value TY, PRD, or SYST depending on the envrinment, would the REXX need to be modified?
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Wed Jul 12, 2006 6:05 pm    Post subject:
Reply with quote

One job, one control card that is generated at the start of the job.

The REXX is never modified.

O.
Back to top
View user's profile Send private message
jasorn

Active User


Joined: 12 Jul 2006
Posts: 153
Location: USA

PostPosted: Wed Jul 12, 2006 6:28 pm    Post subject:
Reply with quote

ofer71 wrote:
One job, one control card that is generated at the start of the job.

The REXX is never modified.

O.


So I'm curious how it handles this situation. I know of a friend who has such a REXX implementation but it can't handle this so maybe if you tell me the gist of how it works there, I can pass it on...

Suppose I had a PROC, not instream, with this in a sort card:

INCLUDE COND=(1,4,CH,EQ,C'V_ENV')

and I want the value of 'V_ENV' to by 'TEST', 'SYST', or 'PROD' based on the environment I'm running in. So that the sort card that gets used in test looks like this:

INCLUDE COND=(1,4,CH,EQ,C'TEST')

Will your setup handle this? And how? Does is go through and read the control card dd statements to figure out what needs to be changed?
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
Location: Israel

PostPosted: Wed Jul 12, 2006 6:34 pm    Post subject:
Reply with quote

It would be something like this:
INCLUDE COND=(1,4,CH,EQ,C<ENV>)

Anything between <> will be replaced by REXX at runtime. It might be LPAR name, table name, database name etc.

The values to substiture the <> are taken either from system variables, or input to the job at invocation.

O.
Back to top
View user's profile Send private message
jasorn

Active User


Joined: 12 Jul 2006
Posts: 153
Location: USA

PostPosted: Wed Jul 12, 2006 6:56 pm    Post subject:
Reply with quote

ofer71 wrote:
It would be something like this:
INCLUDE COND=(1,4,CH,EQ,C<ENV>)

Anything between <> will be replaced by REXX at runtime. It might be LPAR name, table name, database name etc.

The values to substiture the <> are taken either from system variables, or input to the job at invocation.

O.


Perfect. I knew you could do that with REXX.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm
No new posts Cards mainframe developer requirement... capricorn Mainframe Jobs 0 Sun Sep 11, 2016 9:57 am
No new posts how to DYNAMICALLY write sort cond to... mohamedmubee COBOL Programming 13 Fri Aug 26, 2016 11:46 pm
No new posts PL/I: opening file w/ dynamically det... Sam Dodgers PL/I & Assembler 6 Wed Jul 27, 2016 4:05 pm
No new posts Control-M manuals JPVRoff All Other Mainframe Topics 0 Fri May 20, 2016 11:15 am


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