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
 
How to pass values in a query running through DSTAIUL utilit

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
skumars.tripathi

New User


Joined: 27 May 2010
Posts: 12
Location: Kolkata

PostPosted: Mon Feb 21, 2011 7:37 pm    Post subject: How to pass values in a query running through DSTAIUL utilit
Reply with quote

Hi,

I have to create a exract file from a SQL query. I want it to run through DSTAIUL utility. But there is a complex situation. Some of the column values need to be changed dynamically.
Is it possible to pass values of those columns through some way still using DSNTAIUL or I have to write a cobol program which will take those parameter and run the query through the program?
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


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

PostPosted: Mon Feb 21, 2011 8:13 pm    Post subject:
Reply with quote

your requirements are unclear.

provide us with the sql, your expectations.

have no idea what you want to do.
Back to top
View user's profile Send private message
grayWolf

New User


Joined: 04 Oct 2010
Posts: 19
Location: Land of broken dreams

PostPosted: Tue Feb 22, 2011 1:53 pm    Post subject:
Reply with quote

Your requirement is really vague. But still I'll try to answer
You can give your input query in the SYSIN of the DSNTIAUL but the term dynamic is very confusing here. Does it mean that you have to unload the table in a different way according to any business logic? In that case, its best to write a Cobol program and fetch only those columns that you want from the DB2 table and write in a file.
Is it what you expect??
Back to top
View user's profile Send private message
skumars.tripathi

New User


Joined: 27 May 2010
Posts: 12
Location: Kolkata

PostPosted: Tue Feb 22, 2011 4:07 pm    Post subject:
Reply with quote

Hi ,
My Sql query is like this :-
Select A.product_no, b.product_group_type
From ABC A,BCD B,CDE C, DEF D, EFG E
Where A.Product_type = 45 and B.Eff_date > '01.01.2008' and E.Supplier_no >900000

There are a lot more conditions included in where clause.. My concern is to pass these hard coded values in where clause dynamically.
Is it possible to use DSNTAUIL utility by using some means to pass these value dynamically.
Or writing a program is the only option ?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Feb 22, 2011 4:55 pm    Post subject:
Reply with quote

look at this topic for one possible solution.
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 -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts query to fetch record which has only ... maxsubrat DB2 12 Mon Dec 11, 2017 5:03 pm
No new posts How to query MAXGENS of an existing P... Chuchulo Hatyzak JCL & VSAM 4 Wed Nov 22, 2017 10:23 pm
No new posts Native SQL Query kishpra DB2 1 Wed Nov 22, 2017 8:38 pm
No new posts Query on IEFBR14 with GDG Ashishpanpaliya JCL & VSAM 4 Tue Nov 07, 2017 8:34 pm
This topic is locked: you cannot edit posts or make replies. Need help how to pass the ESP variabl... Venkichaitu JCL & VSAM 12 Thu Nov 02, 2017 3:53 am

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