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

Diff Between DSNUTIAL and DSNTEP2


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

New User


Joined: 19 Feb 2005
Posts: 25
Location: chennai

PostPosted: Sun Apr 02, 2006 6:09 pm
Reply with quote

Hi all,

I have come across batch jobs using DSNTIAUL and some jobs use DSNTEP2 to execute th e SQL queries.

What is the actual diff between these 2 utilites.

Please let me know.


Bye....

logaas
Back to top
View user's profile Send private message
T-REXDB2

New User


Joined: 28 Apr 2005
Posts: 11
Location: USA

PostPosted: Mon Apr 03, 2006 9:02 am
Reply with quote

logaas wrote:
Hi all,

I have come across batch jobs using DSNTIAUL and some jobs use DSNTEP2 to execute th e SQL queries.

What is the actual diff between these 2 utilites.

Please let me know.


Bye....

logaas


Hello, Sir, Logaas!

Here is definition of difference:

DSNTIAUL
The sample unload program. This program, which is written in assembler language, 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 32KB 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.

DSNTEP2
A sample dynamic SQL program in the PL/I language. With this program, you can execute any SQL statement that can be executed dynamically. You can use the source version of DSNTEP2 and modify it to meet your needs, or, if you do not have a PL/I compiler at your installation, you can use the object code version of DSNTEP2.

SAMPLE DSNTIAUL
//************************************************************

//*

//* JCL USED TO EXECUTE - DSNTIAUL (IBM UNLOAD) PROGRAM

//*

//************************************************************

//STEP020 EXEC PGM=IKJEFT01,DYNAMNBR=20,REGION=0M

//STEPLIB DD DISP=SHR,DSN=SYS1.DBP1.DSNEXIT

// DD DISP=SHR,DSN=SYS1.DBP1.DSNLOAD

//SYSTSPRT DD SYSOUT=*

//SYSPUNCH DD DUMMY

//SYSREC00 DD DSN=USERID.UNLOAD.CO,

// DISP=(NEW,CATLG,CATLG),

// UNIT=PRDG1,SPACE=(CYL,(250,100),RLSE) ,

//SYSPRINT DD SYSOUT=*

//SYSUDUMP DD SYSOUT=*

//SYSTSIN DD *

DSN SYSTEM(DB2M)

RUN PROGRAM(DSNTIAUL) PLAN(DSNTIAUL) PARM('SQL')

/*

//**********************************************************************

//*

//* THE ';' IS NOT OPTIONAL. MUST BE PRESENT OR A RC=08 WILL BE RECEIVED

//* =============

//**********************************************************************

//SYSIN DD *

SELECT * FROM SYSIBM.SYSDUMMY1 WITH UR ;

//*


SAMPLE DSNTEP2
//*

//STEP020 EXEC PGM=IKJEFT01,DYNAMNBR=20,COND=(0,NE)

//STEPLIB DD DISP=SHR,DSN=SYS1.DBD1.DSNEXIT

// DD DISP=SHR,DSN=SYS1.DBD1.DSNLOAD

// DD DSN=ESASYS2.DBD1.RUNLIB.LOAD,DISP=SHR

//SYSTSPRT DD SYSOUT=*

//*

//SYSPRINT DD SYSOUT=*

//SYSPUNCH DD DUMMY

//SYSUDUMP DD SYSOUT=*

//SYSTSIN DD *

DSN SYSTEM(DB2T)

RUN PROGRAM(DSNTEP2) PLAN(DSNTEP2)

//*

//SYSIN DD *


--#SET TERMINATOR &

CREATE TRIGGER TESTER1

AFTER INSERT ON TEST_OLDTAB

REFERENCING NEW AS N

FOR EACH ROW

MODE DB2SQL

BEGIN ATOMIC

DELETE FROM TEST_TABLE ;

END &

//*


Hope this muchly helps! ;-]
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 DSNTEP2 - setting exception DB2 2
No new posts Sort on different fields, removing du... SYNCSORT 8
No new posts Execute DSNTEP2 in REXX which is call... CLIST & REXX 4
No new posts How syntax check at Bind time is diff... DB2 5
No new posts DB2 plan for DSNTEP2 / DSNTEP4 DB2 3
Search our Forums:

Back to Top