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

How to pass values in a query running through DSTAIUL utilit


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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: 6966
Location: porcelain throne

PostPosted: Mon Feb 21, 2011 8:13 pm
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
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
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: 6966
Location: porcelain throne

PostPosted: Tue Feb 22, 2011 4:55 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Running REXX through JOB CLIST & REXX 13
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts RC query -Time column CA Products 3
No new posts How to pass the PARM value to my targ... COBOL Programming 8
Search our Forums:

Back to Top