Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Reading dynamic values from a file inside a control card

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

New User


Joined: 01 Mar 2010
Posts: 15
Location: chennai

PostPosted: Wed Aug 10, 2011 4:12 pm    Post subject: Reading dynamic values from a file inside a control card
Reply with quote

Hi,

I have the following requirement.

I have query in control card say

select * from table where columnname in (a,b,c)

the values specified in the where condition will be generated dynamically and sent to us through a PS file.
We need to read the values from this file inside the control card.

Can you provide me some pointers on how to proceed on it.

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

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Wed Aug 10, 2011 4:51 pm    Post subject:
Reply with quote

Start here Redbook: Dynamic SQL
Back to top
View user's profile Send private message
Soumik Das

New User


Joined: 06 Aug 2011
Posts: 25
Location: India

PostPosted: Wed Aug 10, 2011 4:59 pm    Post subject: Reply to: Reading dynamic values from a file inside a contro
Reply with quote

One question first.

How will you generate the parameters or the values dynamically? are you using any programs for that?
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


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

PostPosted: Wed Aug 10, 2011 6:04 pm    Post subject:
Reply with quote

I'm not very sure that it can be directly done using SQL/ DB2 on zOS; however, you might consider a SORT solution in which you can create a "control card (as you called it)" which will have the query, which can later be used in DB2-step.

There are some examples in these forums, search for SYMNAMES in DFSort part of the Forum.
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 578
Location: USA

PostPosted: Wed Aug 10, 2011 8:03 pm    Post subject:
Reply with quote

byasmeen,
Are you looking for something like below?
Code:
//SYSIN    DD  DISP=SHR,DSN=FILE WITH SELECT STATEMENT  --> (i.e. SELECT * FROM TABLE WHERE COLUMNNAME IN )
//         DD  DISP=SHR,DSN=FILE WITH VALUES


Thanks,
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
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts Working with hex values in Filemanage... Emile Straker IBM Tools 0 Tue Sep 12, 2017 1:42 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts DB2 NULL Values display V S Amarendra Reddy DB2 3 Thu Sep 07, 2017 6:59 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us