View previous topic :: View next topic
|
Author |
Message |
byasmeen
New User
Joined: 01 Mar 2010 Posts: 15 Location: chennai
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
Back to top |
|
|
Soumik Das
New User
Joined: 06 Aug 2011 Posts: 25 Location: India
|
|
|
|
One question first.
How will you generate the parameters or the values dynamically? are you using any programs for that? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
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 |
|
|
sqlcode1
Active Member
Joined: 08 Apr 2010 Posts: 577 Location: USA
|
|
|
|
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 |
|
|
|