ARCHIVE and DELARC example
Scenario A: Archiving and deleting large files that are no longer needed
Large dump files are archived after they are analyzed, in order to free up space on primary storage:
TSO M9CLI ARCHIVE M9.APPL.DUMP.PDB2.D22052019
TSO M9CLI ARCHIVE M9.APPL.DUMP.TCIC.D16062019
TSO M9CLI ARCHIVE M9.APPL.DUMP.TCIC.D16062019
The raw dump files are kept in archive until the bug is solved, and are then deleted in a batch job, using the DELARC command:
//M9CLISMF JOB ACCT#,TIME=NOLIMIT,REGION=0M
//*
//* DELETING RAW DUMP FILES FROM ARCHIVE
//*
//M9CLI EXEC PGM=IKJEFT01
//STEPLIB DD DISP=SHR,DSN=SYS2.MODEL9.LOADLIB
//SYSEXEC DD DISP=SHR,DSN=M9.ALL.EXEC
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSTSIN DD *
M9CLI DELARC M9.APPL.DUMP.PDB2.D22052019
M9CLI DELARC M9.APPL.DUMP.TCIC.D16062019
/*
//
//*
//* DELETING RAW DUMP FILES FROM ARCHIVE
//*
//M9CLI EXEC PGM=IKJEFT01
//STEPLIB DD DISP=SHR,DSN=SYS2.MODEL9.LOADLIB
//SYSEXEC DD DISP=SHR,DSN=M9.ALL.EXEC
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSTSIN DD *
M9CLI DELARC M9.APPL.DUMP.PDB2.D22052019
M9CLI DELARC M9.APPL.DUMP.TCIC.D16062019
/*
//
If the data sets are not yet expired, the DELARC command will notify - but not delete the files. In this case, the command should be used with the PURGE keyword and the SYSTSIN would be as follows:
//SYSTSIN DD *
M9CLI DELARC M9.APPL.DUMP.PDB2.D22052019 PURGE
M9CLI DELARC M9.APPL.DUMP.TCIC.D16062019 PURGE
//
M9CLI DELARC M9.APPL.DUMP.PDB2.D22052019 PURGE
M9CLI DELARC M9.APPL.DUMP.TCIC.D16062019 PURGE
//
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*