Backup and restoration of system files
For safe operation of the system, make a backup of the system files periodically in case of emergencies such as system file corruption.
Backup of System Files
For backup of system files, use the AMS REPRO command for VSAM files.
Define the output file format as shown in the following table:
System File Name |
Record Length |
Format |
Organization |
---|---|---|---|
Send and Receive Management File (HULFT.FILE) |
22304 |
VB |
PS |
Host Information File (HULFT.HOST) |
504 |
VB |
PS |
Send and Receive Log File (HULFT.LOG) |
27994 |
VB |
PS |
The JOB statement and AMS command are shown below:
Backup of Send and Receive Log File (HULFT.LOG)
[Example of JCL]
The JOB statement and AMS command for backing up the Send and Receive Log file (HULFT.LOG) are shown below.
//XRBKUP JOB CLASS=A,MSGCLASS=B //LOG EXEC PGM=IDCAMS,REGION=2048K //U01 DD DSN=HULFT.LOG,DISP=OLD //U11 DD DSN=HULFT.LOG.BKUP, // DISP=(NEW,CATLG),UNIT=SYSDA,VOL=SER=HUL001, // SPACE=(CYL,(5,5)), // DCB=(BLKSIZE=27998,LRECL=27994,RECFM=VB) //SYSPRINT DD SYSOUT=* //SYSIN DD * REPRO INFILE(U01) OUTFILE(U11) //*
DD Name |
Value |
Description |
---|---|---|
U01 |
HULFT.LOG |
Send and Receive Log File ID Key File |
U11 |
HULFT.LOG.BKUP |
Send and Receive Log File (backup file) |
Parameter Name |
Value |
Description |
---|---|---|
UNIT |
SYSDA |
UNIT |
VOL=SER |
HUL001 |
Volume name |
Backup of Send and Receive Management File (HULFT.FILE)
[Example of JCL]
The JOB statement and AMS command for backing up the Send and Receive Management file (HULFT.FILE) are shown below.
//XRBKUP JOB CLASS=A,MSGCLASS=B //FILE EXEC PGM=IDCAMS,REGION=2048K //U01 DD DSN=HULFT.FILE,DISP=OLD //U11 DD DSN=HULFT.FILE.BKUP, // DISP=(NEW,CATLG),UNIT=SYSDA,VOL=SER=HUL001, // SPACE=(CYL,(5,5)), // DCB=(BLKSIZE=27998,LRECL=22304,RECFM=VB) //SYSPRINT DD SYSOUT=* //SYSIN DD * REPRO INFILE(U01) OUTFILE(U11) //*
DD Name |
Value |
Description |
---|---|---|
U01 |
HULFT.FILE |
Send and Receive Management File |
U11 |
HULFT.FILE.BKUP |
Send and Receive Management File (backup file) |
Parameter Name |
Value |
Description |
---|---|---|
UNIT |
SYSDA |
UNIT |
VOL=SER |
HUL001 |
Volume name |
Backup of Host Information File (HULFT.HOST)
[Example of JCL]
The JOB statement and AMS command for backing up the Host Information file (HULFT.HOST) are shown below.
//XRBKUP JOB CLASS=A,MSGCLASS=B //HOST EXEC PGM=IDCAMS,REGION=2048K //U01 DD DSN=HULFT.HOST,DISP=OLD //U11 DD DSN=HULFT.HOST.BKUP, // DISP=(NEW,CATLG),UNIT=SYSDA,VOL=SER=HUL001, // SPACE=(CYL,(5,5)), // DCB=(BLKSIZE=27998,LRECL=504,RECFM=VB) //SYSPRINT DD SYSOUT=* //SYSIN DD * REPRO INFILE(U01) OUTFILE(U11) //*
DD Name |
Value |
Description |
---|---|---|
U01 |
HULFT.HOST |
Host Information File |
U11 |
HULFT.HOST.BKUP |
Host Information File (backup file) |
Parameter Name |
Value |
Description |
---|---|---|
UNIT |
SYSDA |
UNIT |
VOL=SER |
HUL001 |
Volume name |
Backup of Operation Log File
When you back up the Operation Log files, modify the member name "OPLBKUP" in the HULFT JCL library.
[Example of JCL]
The JOB statement and AMS commands for backing up the Operation Log files are shown below.
//OPLBKUP JOB CLASS=A,MSGCLASS=B //*------< VSAM REPRO >------------------------------- //OPLF1 EXEC PGM=IDCAMS //IN DD DSN=HULFT.OPLFILE1,DISP=OLD //OUT DD DSN=HULFT.OPLFILE1.BKUP, // DISP=(NEW,CATLG),UNIT=SYSDA,VOL=SER=HUL001, // SPACE=(CYL,(30,0)), // DCB=(BLKSIZE=28300,LRECL=2052,RECFM=VB) //SYSPRINT DD SYSOUT=* //SYSIN DD * REPRO INFILE(IN) OUTFILE(OUT) //* //OPLF2 EXEC PGM=IDCAMS //IN DD DSN=HULFT.OPLFILE2,DISP=OLD //OUT DD DSN=HULFT.OPLFILE2.BKUP, // DISP=(NEW,CATLG),UNIT=SYSDA,VOL=SER=HUL001, // SPACE=(CYL,(30,0)), // DCB=(BLKSIZE=28300,LRECL=2052,RECFM=VB) //SYSPRINT DD SYSOUT=* //SYSIN DD * REPRO INFILE(IN) OUTFILE(OUT) //* //OPLC1 EXEC PGM=IDCAMS //IN DD DSN=HULFT.OPLCMD1,DISP=OLD //OUT DD DSN=HULFT.OPLCMD1.BKUP, // DISP=(NEW,CATLG),UNIT=SYSDA,VOL=SER=HUL001, // SPACE=(CYL,(30,0)), // DCB=(BLKSIZE=28300,LRECL=2052,RECFM=VB) //SYSPRINT DD SYSOUT=* //SYSIN DD * REPRO INFILE(IN) OUTFILE(OUT) //* //OPLC2 EXEC PGM=IDCAMS //IN DD DSN=HULFT.OPLCMD2,DISP=OLD //OUT DD DSN=HULFT.OPLCMD2.BKUP, // DISP=(NEW,CATLG),UNIT=SYSDA,VOL=SER=HUL001, // SPACE=(CYL,(30,0)), // DCB=(BLKSIZE=28300,LRECL=2052,RECFM=VB) //SYSPRINT DD SYSOUT=* //SYSIN DD * REPRO INFILE(IN) OUTFILE(OUT) //
DD Name |
Value |
Description |
---|---|---|
IN |
HULFT.OPLFILE1 |
File Access Log File 1 |
OUT |
HULFT.OPLFILE1.BKUP |
File Access Log File 1 (backup file) |
IN |
HULFT.OPLFILE2 |
File Access Log File 2 |
OUT |
HULFT.OPLFILE2.BKUP |
File Access Log File 2 (backup file) |
IN |
HULFT.OPLCMD1 |
Command Execution Log File 1 |
OUT |
HULFT.OPLCMD1.BKUP |
Command Execution Log File 1 (backup file) |
IN |
HULFT.OPLCMD2 |
Command Execution Log File 2 |
OUT |
HULFT.OPLCMD2.BKUP |
Command Execution Log File 2 (backup file) |
Parameter Name |
Value |
Description |
---|---|---|
UNIT |
SYSDA |
UNIT |
VOL=SER |
HUL001 |
Volume name |
Restoration of System Files
For restoration of system files, use the AMS REPRO command for VSAM files.
You must customize the JCL for restoring system files from backup files, according to the conditions of restoration.
Restoration of Send and Receive Log File (HULFT.LOG)
[Example of JCL]
The JOB statement and AMS commands for restoring the Send and Receive Log file (HULFT.LOG) are shown below.
//XRRESET JOB CLASS=A,MSGCLASS=B //*------< XRLOG RESET >------* //LOGREST EXEC PGM=IDCAMS //IN DD DSN=HULFT.LOG.BKUP,DISP=SHR //OUT DD DSN=HULFT.LOG,DISP=OLD //SYSPRINT DD SYSOUT=* //SYSIN DD * REPRO INFILE(IN) OUTFILE(OUT) //* //*------< XRLOG1 RESET >------* //SORT1 EXEC PGM=SORT //SORTIN DD DSN=HULFT.LOG.BKUP,DISP=SHR //SORTOUT DD DSN=&&SORTOUT1,DISP=(,PASS,DELETE),UNIT=SYSDA, // SPACE=(CYL,(010,3)) //SORTWK01 DD UNIT=SYSDA,SPACE=(TRK,(0045,0015)) //SORTWK02 DD UNIT=SYSDA,SPACE=(TRK,(0045,0015)) //SYSOUT DD SYSOUT=* //SYSIN DD * SORT FIELDS=(64,59,BI,A) //* //LOGREST1 EXEC PGM=IDCAMS //IN DD DSN=&&SORTOUT1,DISP=(SHR,PASS) //OUT1 DD DSN=HULFT.LOG.PATH1,DISP=OLD //SYSPRINT DD SYSOUT=* //SYSIN DD * REPRO INFILE(IN) OUTFILE(OUT1) //* //*------< XRLOG2 RESET >------* //SORT2 EXEC PGM=SORT //SORTIN DD DSN=HULFT.LOG.BKUP,DISP=SHR //SORTOUT DD DSN=&&SORTOUT2,DISP=(,PASS,DELETE),UNIT=SYSDA, // SPACE=(CYL,(010,3)) //SORTWK01 DD UNIT=SYSDA,SPACE=(TRK,(0045,0015)) //SORTWK02 DD UNIT=SYSDA,SPACE=(TRK,(0045,0015)) //SYSOUT DD SYSOUT=* //SYSIN DD * SORT FIELDS=(123,9,BI,A) //* //LOGREST2 EXEC PGM=IDCAMS //IN DD DSN=&&SORTOUT2,DISP=(SHR,PASS) //OUT2 DD DSN=HULFT.LOG.PATH2,DISP=OLD //SYSPRINT DD SYSOUT=* //SYSIN DD * REPRO INFILE(IN) OUTFILE(OUT2) //*
DD Name |
Value |
Description |
---|---|---|
IN |
HULFT.LOG.BKUP |
Send and Receive Log File (backup file) |
OUT |
HULFT.LOG |
Send and Receive Log File ID Key File |
SORTIN |
HULFT.LOG.BKUP |
Send and Receive Log File (backup file) |
OUT1 |
HULFT.LOG.PATH1 |
Send and Receive Log Host Name Key File |
OUT2 |
HULFT.LOG.PATH2 |
Send and Receive Log Date Key File |
Parameter Name |
Value |
Description |
---|---|---|
UNIT |
SYSDA |
UNIT |
Restoration of Send and Receive Management File (HULFT.FILE)
[Example of JCL]
The JOB statement and AMS command for restoring the Send and Receive Management file (HULFT.FILE) are shown below.
//XRRESET JOB CLASS=A,MSGCLASS=B //FILEREST EXEC PGM=IDCAMS //IN DD DSN=HULFT.FILE.BKUP, DISP=OLD //OUT DD DSN=HULFT.FILE,DISP=OLD //SYSPRINT DD SYSOUT=* //SYSIN DD * REPRO INFILE(IN) OUTFILE(OUT) //
DD Name |
Value |
Description |
---|---|---|
IN |
HULFT.FILE.BKUP |
Send and Receive Management File (backup file) |
OUT |
HULFT.FILE |
Send and Receive Management File |
Restoration of Host Information File (HULFT.HOST)
[Example of JCL]
The JOB statement and AMS command for restoring the Host Information file (HULFT.HOST) are shown below.
//XRRESET JOB CLASS=A,MSGCLASS=B //HOSTREST EXEC PGM=IDCAMS //IN DD DSN=HULFT.HOST.BKUP, DISP=OLD //OUT DD DSN=HULFT.HOST,DISP=OLD //SYSPRINT DD SYSOUT=* //SYSIN DD * REPRO INFILE(IN) OUTFILE(OUT) //
DD Name |
Value |
Description |
---|---|---|
IN |
HULFT.HOST.BKUP |
Host Information File (backup file) |
OUT |
HULFT.HOST |
Host Information File |
When you restore system files, do not execute the System File Initialization program (XRCREATE) to initialize the files. Instead, create new system files, then execute the above jobs for restoration.
Restoration of Operation Log File
For restoration of the Operation Log files, use the AMS REPRO command for VSAM files.
You must customize the JCL for restoring the Operation Log files from backup files, according to the conditions of restoration.
[Example of JCL]
The JOB statement and AMS commands for restoring the Operation Log files are shown below.
//OPLRESET JOB CLASS=A,MSGCLASS=B //FILE1RST EXEC PGM=IDCAMS //IN DD DSN=HULFT.OPLFILE1.BKUP,DISP=SHR //OUT DD DSN=HULFT.OPLFILE1,DISP=SHR //SYSPRINT DD SYSOUT=* //SYSIN DD * REPRO INFILE(IN) OUTFILE(OUT) //* //FILE2RST EXEC PGM=IDCAMS //IN DD DSN=HULFT.OPLFILE2.BKUP,DISP=SHR //OUT DD DSN=HULFT.OPLFILE2,DISP=SHR //SYSPRINT DD SYSOUT=* //SYSIN DD * REPRO INFILE(IN) OUTFILE(OUT) //* //CMD1RST EXEC PGM=IDCAMS //IN DD DSN=HULFT.OPLCMD1.BKUP,DISP=SHR //OUT DD DSN=HULFT.OPLCMD1,DISP=SHR //SYSPRINT DD SYSOUT=* //SYSIN DD * REPRO INFILE(IN) OUTFILE(OUT) //* //CMD2RST EXEC PGM=IDCAMS //IN DD DSN=HULFT.OPLCMD2.BKUP,DISP=SHR //OUT DD DSN=HULFT.OPLCMD2,DISP=SHR //SYSPRINT DD SYSOUT=* //SYSIN DD * REPRO INFILE(IN) OUTFILE(OUT) //
DD Name |
Value |
Description |
---|---|---|
IN |
HULFT.OPLFILE1.BKUP |
File Access Log File 1 (backup file) |
OUT |
HULFT.OPLFILE1 |
File Access Log File 1 |
IN |
HULFT.OPLFILE2.BKUP |
File Access Log File 2 (backup file) |
OUT |
HULFT.OPLFILE2 |
File Access Log File 2 |
IN |
HULFT.OPLCMD1.BKUP |
Command Execution Log File 1 (backup file) |
OUT |
HULFT.OPLCMD1 |
Command Execution Log File 1 |
IN |
HULFT.OPLCMD2.BKUP |
Command Execution Log File 2 (backup file) |
OUT |
HULFT.OPLCMD2 |
Command Execution Log File 2 |
When you restore the Operation Log files, do not execute the System File Initialization program (XRCREATE) to initialize the files. Instead, create new Operation Log files, then execute the above jobs for restoration.