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

What is the DB2 utility to select SQL from a JCL?


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dharmendra_kp

New User


Joined: 10 Mar 2005
Posts: 33
Location: Lewiston

PostPosted: Thu Nov 27, 2008 4:24 pm
Reply with quote

I used to run DB2 select SQL queries against standard db2 utility form a JCL for generating report, similar to unload utility DSNUPROC. But during last two years I have completely forgotten the utility name and syntax.

Please help me by giving any info link, that you can.

Thanks & regards
Dharmendra
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Thu Nov 27, 2008 5:12 pm
Reply with quote

Hi Dharmendra,

Are you referring DSNTEP2 or DSNTEP4?

This is the link
publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db29.doc.apsg/db2z_dsntep24.htm

Anyway, please check it with the peers or support to get sample JCLs with your standards.
Back to top
View user's profile Send private message
dharmendra_kp

New User


Joined: 10 Mar 2005
Posts: 33
Location: Lewiston

PostPosted: Fri Nov 28, 2008 11:34 am
Reply with quote

Thanks Gannas,
I got the utility that I was looking for. Its DB2HPU. But unfortunetely its not available in my current shop. So I have just looked into manuals for DSNTEP2. I think this will serve the purpose. I wil keep you posted on my progress.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Mon Dec 01, 2008 3:03 pm
Reply with quote

Hi,

If you explain a little more about what you are actually looking for, hopefully, some one will be around. So far, the description from your side does not give us much to help you out.
Back to top
View user's profile Send private message
dharmendra_kp

New User


Joined: 10 Mar 2005
Posts: 33
Location: Lewiston

PostPosted: Tue Dec 02, 2008 11:43 am
Reply with quote

Hi All,
I had a requirement to automate a set of reports. Hitherto these report were generated by running adhoc SPUFI. So I had two option
1. Use DB2 utility to run the SQL or
2. write a program

Since this query is fairly dynamic, I mean the requirements of the report changes frequently. So writing a program means overhead. So I started looking for suitable utility and found that earlier I used DB2HPU. This is a standard utility to run all DML and select SQL query. Here you can give HEADER <report header>. also. But this is not available in my shop.

So I successfully used productivity-aid sample program DSNTIAUL.
This program, which is written in assembler language, is a simple alternative to the UNLOAD utility. It unloads some or all rows from up to 100 DB2 tables. With DSNTIAUL, you can unload data of any DB2 built-in data type or distinct type. You can unload up to 32 KB of data from a LOB column. DSNTIAUL unloads the rows in a form that is compatible with the LOAD utility and generates utility control statements for LOAD. DSNTIAUL also lets you execute any SQL non-SELECT statement that can be executed dynamically.

Thanks and regards
Dharmendra
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 REASON 00D70014 in load utility DB2 6
No new posts Dynamically pass table name to a sele... DB2 2
No new posts SELECT from data change table DB2 5
No new posts Select two different counts from SQL... DB2 6
No new posts ISRSUPC search utility - using high l... TSO/ISPF 2
Search our Forums:

Back to Top