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.

One thought on “Running DSNTIAUL using IKJEFT01 for batch unload”

  1. 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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.