Load
1. LOAD JCL
//LEBRONJ JOB (12345678),LEBRON,MSGCLASS=H,
// MSGLEVEL=(1,1),CLASS=A,NOTIFY=&SYSUID
//UTIL EXEC DSNUPROC,SYSTEM=DB8G,UID='LEBRONJ',UTPROC=''
//DSNUPROC.SORTWK01 DD DSN=LEBRON.SORTWK01,
// DISP=(MOD,DELETE,CATLG),
// SPACE=(16384,(20,20),,,ROUND),
// UNIT=SYSDA
//DSNUPROC.SORTWK02 DD DSN=LEBRON.SORTWK02,
// DISP=(MOD,DELETE,CATLG),
// SPACE=(16384,(20,20),,,ROUND),
// UNIT=SYSDA
//DSNUPROC.SORTWK03 DD DSN=LEBRON.SORTWK03,
// DISP=(MOD,DELETE,CATLG),
// SPACE=(16384,(20,20),,,ROUND),
// UNIT=SYSDA
//DSNUPROC.SORTWK04 DD DSN=LEBRON.SORTWK04,
// DISP=(MOD,DELETE,CATLG),
// SPACE=(16384,(20,20),,,ROUND),
// UNIT=SYSDA
//DSNUPROC.SYSREC DD DSN=LEBRON.TABLE.DATA,
// DISP=OLD
//DSNUPROC.SYSUT1 DD DSN=LEBRON.SYSUT1,
// DISP=(MOD,DELETE,CATLG),
// SPACE=(16384,(20,20),,,ROUND),
// UNIT=SYSDA
//DSNUPROC.SORTOUT DD DSN=LEBRON.SORTOUT,
// DISP=(MOD,DELETE,CATLG),
// SPACE=(16384,(20,20),,,ROUND),
// UNIT=SYSDA
//DSNUPROC.SYSERR DD DSN=LEBRON.SYSERR,
// DISP=(MOD,DELETE,CATLG),
// SPACE=(16384,(20,20),,,ROUND),
// UNIT=SYSDA
//DSNUPROC.SYSMAP DD DSN=LEBRON.SYSMAP,
// DISP=(MOD,DELETE,CATLG),
// SPACE=(16384,(20,20),,,ROUND),
// UNIT=SYSDA
//DSNUPROC.SYSIN DD DSN=LEBRON.TABLE.RUN,
// DISP=(MOD,CATLG)
//
2. DSNUPROC.SYSREC
存放的是从Table中UNLOAD的数据.
3. DSNUPROC.SYSIN
存放的是从UNLOAD过程中生成的control statement, see a example below:
LOAD DATA INDDN SYSREC ENFORCE NO
EBCDIC CCSID(00037,00000,00000)
INTO TABLE "LEBRON"."LBNTABLE"
WHEN(00001:00002 = X'0003')
( "ID"
POSITION( 00003:00022) CHAR(00020)
, "NAME"
POSITION( 00023:00042) CHAR(00020)
)
LOAD Parameters
l LOAD RESUME
Append the data to the table. That means you won't lost existing data.
l LOAD REPLACE
Delete the existing data in tablespace(all the tables in tablespace will lost the data) and load the given data in mentioned table.
l LOAD ENFORCE CONSTRAINTS
The ENFORCE CONSTRAINTS option indicates that LOAD is to enforce referential constraints on the data that is being added. This option is also the default. All violations are reported in the output. All records causing these violations are not loaded and placed in the SYSDISC data set, which is the default data set for discarded records.
l LOAD ENFORCE NO
ENFORCE NO indicates that the LOAD utility is not to enforce referential constraints and places the table in CHECK-PENDING status. Use this option if you are loading data into several tables that are related in such a way that the referential constraints cannot be checked until all tables are loaded. For example, a column in table A depends on a column in table B; a column in table B depends on a column in table C; and a column in table C depends on a column in table A.
l LOAD LOG YES
LOG YES indicates that logging is to occur during the LOAD job.
l LOAD LOG NO
Cause tablespace to COPY-PENDING status except using LOAD LOG NO NOCOPYPEND. To remove the COPY PENDING status, you take an image copy or use REPAIR Utility or use command like -START DATABASE(dbname) SPACENAM(tablespace name) ACCESS(FORCE).