Example 6. Creating a self-maintaining history file
//UTILJOB4 JOB ...
//IDCAMS EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
ALLOC DSNAME('MY.HIST') -
NEW -
SPACE(10 10) -
CYLINDERS -
RECFM(V B) -
LRECL(10000) -
DIR(10) -
DSNTYPE(LIBRARY)
/*
//RUNUTIL EXEC PGM=IDIUTIL
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
SetMinFaultEntries(MY.HIST,100)
/*
This code creates a history file with maximum automatic free space reclamation that should never run out of space provided that the data set allocation is sufficient to hold the minimum number of faults as per the SetMinFaultEntries specification.
You might also want to add a SETFAULTPREFIX control statement to your history file creation jobs (see SETFAULTPREFIX control statement) to make fault IDs in each new history file unique.