Loading data using LOAD utility control statements

Note: To load data in this way, the default INDDN name (in the INDDN template name field on the second TEMPLATE Options panel) must be blank.

To load data from a previous Db2® unload operation:

  1. In the entry fields for input data, specify the name of the data set (Data set name), and optionally the name of the member (Member), containing the data to be loaded.
  2. In the entry fields for utility control statements, specify the name of the data set (Data set name), and optionally the name of the member (Member), containing the utility control statements.
  3. Select option 1 (The data is described by utility control statements)
  4. Press Enter.
    FM/Db2 constructs a batch job to run the Db2® LOAD utility job using the input details you have specified. Sample JCL generated for LOAD Utility using LOAD utility control statements shows an example of generated JCL for loading a table using data in Db2® “unload” format.
    Figure 1. Sample JCL generated for LOAD Utility using LOAD utility control statements
       File  Edit  Edit_Settings  Menu  Utilities  Compilers  Test  Help
    ────────────────────────────────────────────────────────────────────────────────
     EDIT       FMNUSER.SPFTEMP1.CNTL                           Columns 00001 00072
     ****** ***************************** Top of Data ******************************
     000001 //FMNUSERB JOB (IBMGSA),
     000002 //             FMNUSER,MSGCLASS=A,
     000003 //             NOTIFY=FMNUSER,CLASS=A,
     000004 //             MSGLEVEL=(1,1)
     000005 //*
     000006 //         JCLLIB ORDER=(DB2V810.DFA2.PROCLIB)
     000007 //*
     000008 //**********************************************************************
     000009 //*
     000010 //* FM/Db2 GENERATED JOB TO LOAD A TABLE
     000011 //*
     000012 //**********************************************************************
     000013 //*
     000014 //**********************************************************************
     000015 //* STEP SETPARM: OVERRIDE ANY GLOBAL DATASET SIZING VALUES HERE
     000016 //**********************************************************************
     000017 //SETPARM SET ALLOC='TRK',PRI='1',SEC='1'
     000018 //*
     000019 //**********************************************************************
     000020 //* STEP LOAD: LOAD THE TABLE
     000021 //**********************************************************************
     000022 //LOAD     EXEC DSNUPROC,SYSTEM=DFA2,UID='FMNUSER'
     000023 //DSNUPROC.STEPLIB  DD DSN=DB2V810.DFA2.SDSNEXIT,DISP=SHR
     000024 //         DD DSN=DB2.V810.SDSNLOAD,DISP=SHR
     000025 //DSNUPROC.SYSREC00 DD DISP=SHR,             INPUT DATA
     000026 //         DSN=FMNUSER.DATA(FMNCDATA)
     000027 //DSNUPROC.SYSDISC  DD SYSOUT=*              DISCARDED RECORDS
     000028 //DSNUPROC.SYSERR   DD UNIT=SYSALLDA,
     000029 //         SPACE=(TRK,(1,1))                 ERROR INFORMATION
     000030 //DSNUPROC.SYSMAP   DD UNIT=SYSALLDA,
     000031 //         SPACE=(TRK,(1,1))                 INTERNAL MAPPING DATA SET
     000032 //DSNUPROC.SYSUT1   DD UNIT=SYSALLDA,
     000033 //         SPACE=(&ALLOC,(&PRI,&SEC),RLSE)
     000034 //DSNUPROC.SORTOUT  DD UNIT=SYSALLDA,
     000035 //         SPACE=(&ALLOC,(&PRI,&SEC),RLSE)
     000036 //DSNUPROC.SYSIN    DD *
     000037 LOAD DATA
     000038 PREFORMAT
     000039 LOG YES
     000040 INDDN SYSREC00
     000041 RESUME YES
     000042 FLOAT(IEEE)
     000043 ASCII
     000044 SORTKEYS 100
     000045 SORTDEVT SYSDA
     000046 INTO TABLE
     000047 "FMNUSER"."EMP"
     000048 (
     000049  "EMPNO             " POSITION(1     :2     ) CHAR(6)
     000050 ,"SALARY            " POSITION(27    :30    ) DECIMAL
     000051 )
     ****** **************************** Bottom of Data ****************************
    
     Command ===>                                                  Scroll ===> PAGE
      F1=Help      F2=Split     F3=Exit      F5=Rfind     F6=Rchange   F7=Up
      F8=Down      F9=Swap     F10=Left     F11=Right    F12=Cancel

Related tasks

Related references