View previous topic :: View next topic
|
Author |
Message |
skumars.tripathi
New User
Joined: 27 May 2010 Posts: 12 Location: Kolkata
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
your requirements are unclear.
provide us with the sql, your expectations.
have no idea what you want to do. |
|
Back to top |
|
|
grayWolf
New User
Joined: 04 Oct 2010 Posts: 19 Location: Land of broken dreams
|
|
|
|
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 |
|
|
skumars.tripathi
New User
Joined: 27 May 2010 Posts: 12 Location: Kolkata
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
look at this topic for one possible solution. |
|
Back to top |
|
|
|