Restore file from backup (IMPORT)
IDCAMS Restore file from backup (IMPORT) Example
Scenario - Import backup PS file to KSDS.
Input ESDS File - MATEPK.EMPL.BACKUP
JCL -
----+----1----+----2----+----3----+----4----+----5----+
//MATEPKI JOB (123),'MTH',CLASS=A,MSGCLASS=A,
// MSGLEVEL=(1,1),NOTIFY=&SYSUID
//********************************************
//* IMPORT BACKUP PS DATA TO THE KSDS DATA SET
//********************************************
//STEP010 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//BACKUP DD DSN=MATEPK.EMPL.BACKUP,DISP=SHR
//SYSIN DD *
IMPORT -
INFILE(BACKUP) -
OUTDATASET(MATEPK.TEST.KSDS) -
INTOEMPTY
/*
Output -
Once the above JCL is submitted, check the MAXCC of the job for any errors. If the MAXCC is 00 or 04, then REPRO is successful.
Explaining Example -
In the above example,
- INFILE(BACKUP) specifies the source backup PS file.
- OUTDATASET(MATEPK.TEST.KSDS) specifies the original file that needs to create to import the data.
- INTOEMPTY specifies the target file is empty.