Joined: 05 Dec 2006 Posts: 177 Location: Seattle, WA
I have been using IKJEFT01 to insert rows into a DB2 table via batch successfully. However, it's annoying to run the job 8 times (or with 8 steps), inserting one row at a time.
Is there a way to use IKJEFT01 to perform multiple row inserts in one pass?
Here's my job:
Code:
//MV603IN JOB (7350,SLZZ,MSLZZB,00),'MV603 ',
// MSGCLASS=O,CLASS=T,REGION=0M,NOTIFY=MV603
//*===================================================================*
// SET PROJECT=MVD
// SET ENVIR=ENVA
// JCLLIB ORDER=(MVD.&ENVIR..CTM.JCL)
// INCLUDE MEMBER=IJOBLIB
// INCLUDE MEMBER=IDSNPRMS
// INCLUDE MEMBER=IOUTPUT
// INCLUDE MEMBER=IMISCELL
//*********************************************************************
//* INSERT DATA INTO THE DB2 TABLE
//*********************************************************************
//STEP1 EXEC PGM=IKJEFT01,DYNAMNBR=20,TIME=300
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSTSIN DD DISP=SHR,DSN=MV603.INCLUDE.CNTL(SYSTSIN)
//SYSIN DD DISP=SHR,DSN=MV603.INCLUDE.CNTL(INSERT06)
/*
The SYSTSIN is:
Code:
DSN SYSTEM(DSN )
RUN PROGRAM(DSNTEP2) PLAN(DSNTEP2) PARMS('/ALIGN(LHS)') -
LIB('SYS2.SDSNLOAD.DSN')
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
You should just be able to repeat the whole insert statement with different values. Each insert is a seperate SQL statement (and needs to be terminated with a ;).