Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 6966
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: 6966
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 Check Binary Values for symbols gandikk CA Products 3 Tue Mar 21, 2017 5:11 am
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts Determine Region with max bandwidth f... seahawk789 COBOL Programming 3 Mon Feb 27, 2017 8:26 pm
No new posts Replacing same string with different ... vickey_dw DFSORT/ICETOOL 6 Wed Feb 22, 2017 10:44 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us