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
 

 

How to override Control card

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

New User


Joined: 04 Jul 2007
Posts: 92
Location: Hyderabad

PostPosted: Mon Nov 24, 2008 6:32 pm    Post subject: How to override Control card
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: 8593
Location: Back in jolly old England

PostPosted: Mon Nov 24, 2008 6:39 pm    Post subject:
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: 92
Location: Hyderabad

PostPosted: Mon Nov 24, 2008 6:48 pm    Post subject:
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    Post subject:
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

Senior Member


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

PostPosted: Tue Nov 25, 2008 2:28 am    Post subject:
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: 92
Location: Hyderabad

PostPosted: Tue Nov 25, 2008 5:50 pm    Post subject:
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    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
This topic is locked: you cannot edit posts or make replies. Sort card to replace text using cross... Susanta SYNCSORT 32 Tue Sep 13, 2016 4:17 pm
No new posts Creating a dynamic sort card in JCL u... ChitraChhabra DFSORT/ICETOOL 4 Wed Aug 03, 2016 6:15 pm
No new posts Compiler option for override the exte... muralikrishnan_new COBOL Programming 9 Fri Jul 08, 2016 12:09 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