Loading
Running DSNTIAUL using IKJEFT01 for batch unload
DSNTIAUL (an assembler program used to process select statements dynamically) is used to unload the tables, or to get the results of an SQL select in the unload format.
No details about the query will be displayed, just the resultset will be in the SYSPRINT.
Unloading the whole table.
//STEP0001 EXEC PGM=IKJEFT01 //STEPLIB DD DISP=SHR, // DSN='SSID.SDSNLOAD' //SYSTSPRT DD SYSOUT=* //SYSPRINT DD DISP=(NEW,CATLG,DELETE), // SPACE=(CYL,(250,100),RLSE), // UNIT=DISK, // DCB=(RECFM=FB,LRECL=80,BLKSIZE=0), // DSN=TEST.MYDSN //SYSUDUMP DD SYSOUT=* //SYSTERM DD SYSOUT=* //SYSTSOUT DD SYSOUT=* //SYSTSIN DD * DSN SYSTEM(SSID) RUN PROGRAM(DSNTIAUL) PLAN(DSNTIAUL) LIB ('SSID.SDSNLOAD') /* //SYSIN DD * SYSIBM.SYSDUMMY1 /*
Unloading a specific SQL select.
//STEP0001 EXEC PGM=IKJEFT01 //STEPLIB DD DISP=SHR, // DSN='SSID.SDSNLOAD' //SYSTSPRT DD SYSOUT=* //SYSPRINT DD DISP=(NEW,CATLG,DELETE), // SPACE=(CYL,(250,100),RLSE), // UNIT=DISK, // DCB=(RECFM=FB,LRECL=80,BLKSIZE=0), // DSN=TEST.MYDSN //SYSUDUMP DD SYSOUT=* //SYSTERM DD SYSOUT=* //SYSTSOUT DD SYSOUT=* //SYSTSIN DD * DSN SYSTEM(SSID) RUN PROGRAM(DSNTIAUL) PLAN(DSNTIAUL) PARMS('SQL,1') – LIB ('SSID.SDSNLOAD') /* //SYSIN DD * SELECT * FROM SYSIBM.SYSDUMMY1 /*
The Parm ‘SQL,1’ says that I am giving an SQL statement and fetch only one record from the resultset into SYSPRINT.
Related Posts
- DIRECT YES and DIRECT NO options in BMC unload plus
- DB2 commands : TERM, START, STOP, DIS
- Logical Operators in DB2
- Embedded DB2 SQL and Cursor in Easytrieve
- Using MAXASSIGNEDVAL from SYSIBM.SYSSEQUENCES (IBM DB2 for Z OS)
- Creating (Declaring), Inserting data into DB2 temporary tables
- Using IKJEFT01 for Binding a normal batch DB2 program
- Using IKJEFT01 for running a normal batch DB2 program
- Running DSNTEP2 / DSNTEP4 using IKJEFT01 for batch SQL(DB2) processing
blog comments powered by Disqus
There's 1 Comment So Far
February 24th, 2011 at 7:02 am
Its very great regarding this and it is very usefull for the analyst and much more services hav to be provided by u.Thanks a lot.bcoz people like is used to see the sites like this feels very happy to learn the thing new day to day life.
Thanks once again.
Share your thoughts, leave a comment!