Prepare Mainframe Data

Provides instructions for using DB2 on the mainframe to unload mainframe data and execute the LOAD control statement.

Here, you UNLOAD the sample table, DSN81110.EMP, using Micro Focus Rumba+ Desktop to create and submit the appropriate JCL.

Create a Rumba+ session

  1. From your Windows desktop, start the Rumba+ Desktop.
  2. In the Create New Session group, click Mainframe Display.
  3. Click Connection > Configure.

    This opens the Session Configuration dialog box.

  4. In the left pane, click Connection > General. In the right pane, under Installed Interfaces, click TN3270.
  5. In the left pane, click Connection > TN3270. In the right pane click Insert, specify a Host Name / IP Address, and then click Apply.
  6. Click OK to exit the Session Configuration dialog box.

Log onto the mainframe

  1. Click Connection > Connect to start a mainframe session.
  2. In the Application field, type TSO and then press Return.
  3. Type your mainframe user ID; then press Return.
  4. In the Password field, type your mainframe password and then press Return.

Configure mainframe data

Access mainframe utilities
  1. Press Return to display the ISPF Primary Option Menu.
  2. Select Utilities, in the Option field, type 3 and then press Return.

    This displays the Utility Selection Panel.

Configure data sets
  1. Select Data Set, in the Option field, type 2and then press Return.

    This displays the Data Set Utility.

  2. Under ISPF Library, in the Project field, type your mainframe user ID.
  3. In the Group field, type ABC.
  4. In the Type field, type JCL
  5. In the Option filed, type A to allocate the data set for JCL and then press Return.

    This displays the Allocate New Data Set panel.

  6. In the panel, enter the following fields:
    • Space units: CYLS
    • Primary quantity: 1
    • Secondary quantity: 1
    • Directory blocks: 5
    • Record format: FB
    • Record length: 80
    • Data set name type: PDS
  7. Move the cursor to Command, then press Return.
  8. Press F3 twice to return to the ISPF Primary Option Menu.
Create and submit a JCL job
  1. Select Edit, in the Option field, type 2 and then press Return

    This displays the Edit Entry Panel panel.

  2. In the Member field, type EMPDEMO to create the JCL; then press Return.
  3. Code the JCL required to unload the data from the DSN81110.EMP table using DSNUTILB and to generate SYSPUNCH for the LOAD control statement. For example, here you use the following z/OS mainframe job where the mainframe user is MFIXCH:
    //MFIXCH02 JOB (DB2JOB),'DB2 JOB',REGION=4M,    
    //     CLASS=A,MSGCLASS=X,MSGLEVEL=(1,1) 
    //UNLOAD1  EXEC PGM=DSNUTILB,REGION=0M,PARM='DBBR,MFIXCH' 
    //STEPLIB  DD DSN=DSNB10.SDSNLOAD,DISP=SHR
    //SYSREC   DD DSN=MFIXCH.UTILBTS.SYSREC1,                           
    //       DISP=(MOD,CATLG),                            
    //       UNIT=SYSDA,SPACE=(CYL,(1,1))     
    //SYSPUNCH DD DSN=MFIXCH.UTILBTS.PUNCH1,    
    //       UNIT=SYSDA,SPACE=(TRK,(1,1)),DISP=(MOD,CATLG) 
    //SYSPRINT DD SYSOUT=* 
    //UTPRINT  DD  DUMMY 
    //SORTOUT  DD  UNIT=SYSDA,SPACE=(4000,(20,20),,,ROUND) 
    //SYSDISC  DD  DUMMY
    //SYSERR   DD  UNIT=SYSDA,SPACE=(4000,(20,20),,,ROUND)                  
    //SYSMAP   DD  UNIT=SYSDA,SPACE=(4000,(20,20),,,ROUND)                  
    //SYSUT1   DD  UNIT=SYSDA,SPACE=(4000,(20,20),,,ROUND)                  
    //SYSIN    DD *                                                         
    UNLOAD DATA FROM TABLE DSN81110.EMP                                      
    /*                                                              
    //
  4. To save and submit your JCL, enter SAVE into the Command field, and then enter SUB into the Command field.