View previous topic :: View next topic
|
Author |
Message |
dp33770
New User
Joined: 04 Jul 2007 Posts: 91 Location: Hyderabad
|
|
|
|
I have unload control card which has where condition as TABLE_ID = 271.
I want to pass 271 from JCL as it may vary for different job.
How can I pass a value as a parameter so that the load control card can be used for different tables.
ex:
Code: |
SELECT TABLE_ID
,USER_KEY
FROM XXXX.TBL_USR
WHERE TABLE_ID = &Var |
The Var value I will pass in JCL in control card
Edited: Please use BBcode when You post some code, that's rather readable...Anuj |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
One PDS member per table id and then use a symbolic to access the correct member. |
|
Back to top |
|
|
dp33770
New User
Joined: 04 Jul 2007 Posts: 91 Location: Hyderabad
|
|
|
|
The problem is that I want to have only once control card. And once I pass the &Var ( table ID) it should be override the below QUERY
SELECT TABLE_ID ,USER_KEY
FROM XXXX.TBL_USR
WHERE TABLE_ID = &Var
NOTE: The query is kept in a Control Card. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Control cards are not JCL so the variable substitutions that are applied to JCL are not applied to control cards! I would go with and have used Expat's solution. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Hi,
The way question is been posted so far - Expat has suggested the practical soultion which is in use across shops. If you have some other point of view as well for your problem you need to tell us - may be some one will come up with a approach suitable to you.
You are trying to change the table name every time a different JOB inokes the "contorl Card" - so query itself, anyways, is changed. Let the differnt JOBs pick a differrnt member itself - what's the deal then ? |
|
Back to top |
|
|
dp33770
New User
Joined: 04 Jul 2007 Posts: 91 Location: Hyderabad
|
|
|
|
Thanks all.
My problem is solved with C1PRMGEN utility.
Thanks again !!
Moderator's Note: that is a proprietary utility. |
|
Back to top |
|
|
|