Loading EID descriptions into a table

You can load EID descriptions through SQL SELECT statements in whatever order or format that is required.

About this task

Procedure

To load EID descriptions into a table:

  1. Run the following CREATE statements, under SYSADM authority. The SQL can be changed to place the tables in a different table space.
    CREATE TABLESPACE EIDTS
            IN DSN8D11A
            USING STOGROUP DSN8G110;
    CREATE TABLE DSN8B10.EID_DESCRIPTIONS
            (RMID          CHAR(6)  NOT NULL,
             EID           CHAR(9),
             CSECT         CHAR(8),
             DESCRIPTION   CHAR(29),
             TYPE          CHAR,
             TRACEITEMS    CHAR(14),
             SEQ           INTEGER NOT NULL)
             IN DSN8D11A.EIDTS;
  2. Use the following LOAD command to load the table with the data in prefix.SDSNSAMP(DSNWEIDS). Change the JCL on the LOAD command to suit your environment. Make sure that the INDDN parameter identifies a DD statement that points to the data as it is shipped with Db2.
    LOAD DATA INDDN(SYSREC) LOG(NO)
        INTO TABLE DSN8B10.EID_DESCRIPTIONS
            (RMID          POSITION(1:6)    CHAR(6),
             EID           POSITION(8:16)   CHAR(9),
             CSECT         POSITION(18:25)  CHAR(8),
             DESCRIPTION   POSITION(27:55)  CHAR(29),
             TYPE          POSITION(57)     CHAR,
             TRACEITEMS    POSITION(59:72)  CHAR(14),
             SEQ           POSITION(74:80)  INTEGER EXTERNAL(6))
  3. After the table is loaded, run the following command to start the database:
    -START DATABASE (DSN8D11A) SPACENAM (EIDTS) ACCESS (RW)