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

How to override Control card


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

New User


Joined: 04 Jul 2007
Posts: 91
Location: Hyderabad

PostPosted: Mon Nov 24, 2008 6:32 pm
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Nov 24, 2008 6:39 pm
Reply with quote

One PDS member per table id and then use a symbolic to access the correct member.
Back to top
View user's profile Send private message
dp33770

New User


Joined: 04 Jul 2007
Posts: 91
Location: Hyderabad

PostPosted: Mon Nov 24, 2008 6:48 pm
Reply with quote

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

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Mon Nov 24, 2008 7:22 pm
Reply with quote

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

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Nov 25, 2008 2:28 am
Reply with quote

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

New User


Joined: 04 Jul 2007
Posts: 91
Location: Hyderabad

PostPosted: Tue Nov 25, 2008 5:50 pm
Reply with quote

Thanks all.
My problem is solved with C1PRMGEN utility.

Thanks again !!

Moderator's Note: that is a proprietary utility.
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 JCL sort card - get first day and las... JCL & VSAM 9
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts Generate output lines (SYSIN card for... DFSORT/ICETOOL 4
No new posts Need suggestion on a sort card DFSORT/ICETOOL 10
No new posts Want to mask Middle 8 Digits of Debit... COBOL Programming 3
Search our Forums:

Back to Top