IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Modify control cards dynamically


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jasorn
Warnings : 1

Active User


Joined: 12 Jul 2006
Posts: 191
Location: USA

PostPosted: Wed Jul 12, 2006 5:14 pm
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
Warnings : 1

Active User


Joined: 12 Jul 2006
Posts: 191
Location: USA

PostPosted: Wed Jul 12, 2006 5:20 pm
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: 2358
Location: Israel

PostPosted: Wed Jul 12, 2006 5:49 pm
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
Warnings : 1

Active User


Joined: 12 Jul 2006
Posts: 191
Location: USA

PostPosted: Wed Jul 12, 2006 6:00 pm
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: 2358
Location: Israel

PostPosted: Wed Jul 12, 2006 6:05 pm
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
Warnings : 1

Active User


Joined: 12 Jul 2006
Posts: 191
Location: USA

PostPosted: Wed Jul 12, 2006 6:28 pm
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: 2358
Location: Israel

PostPosted: Wed Jul 12, 2006 6:34 pm
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
Warnings : 1

Active User


Joined: 12 Jul 2006
Posts: 191
Location: USA

PostPosted: Wed Jul 12, 2006 6:56 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts Dynamically pass table name to a sele... DB2 2
No new posts Help Control-R IBM Tools 2
No new posts FD Section to Create FB or Vb File Dy... COBOL Programming 1
No new posts Try to understand IMS control block IMS DB/DC 0
Search our Forums:

Back to Top