You can unload, and reload, the complete contents of a named counter pool to and from a sequential data set by invoking the server program with the FUNCTION parameter, using the UNLOAD and RELOAD options.
You can use this function, for example, to
The UNLOAD function requires a DD statement for DDNAME DFHNCUL describing the sequential data set to which the table pool is to be unloaded. The format of the unloaded data set is:
The RELOAD function requires a DD statement for DDNAME DFHNCRL, describing the sequential data set from which the table pool is to be reloaded.
The structure is allocated, if necessary, during reloading, in which case you can use the same server parameters to control structure attributes as for normal server startup. The reload process bypasses named counters that are already found in the pool (for example, because the structure was too small and the reload job had to be restarted after using ALTER to increase the structure size).
For the UNLOAD and RELOAD function, the server program requires exclusive use of the list structure. If the structure is currently being used by a normal server, the unload or reload attempt is rejected. Similarly, if a normal server attempts to start up while an unload or reload job is in progress, the attempt fails because shared access to the structure is not available.
You can specify all normal server parameters when unloading or reloading, but some of these (for example, statistics-related parameters) are ignored because they do not apply to unload or reload processing.
If reloading fails because it runs out of space, the resulting messages include the numbers of named counters reloaded and blocks read up to the time of the failure. You can compare these values with those in the messages from the original unload job, to determine how many more named counters remain to be loaded.
//UNLDNCD1 JOB ...
//NCUNLOAD EXEC PGM=DFHNCMN CICS named counter server program
//STEPLIB DD DSN=CICSTS31.CICS.SDFHAUTH,DISP=SHR Authorized library
//SYSPRINT DD SYSOUT=* Options, messages and statistics
//DFHNCUL DD DSN=NC1.UNLOADED.POOL, Unloaded named counter pool
// DISP=(NEW,CATLG),
// SPACE=(4096,(10000,1000)) Estimated size in 4K blocks
//SYSIN DD *
FUNCTION=UNLOAD Function to be performed is UNLOAD
POOLNAME=PRODNC1 Pool name
/*
//RELDNCD1 JOB ...
//NCRELOAD EXEC PGM=DFHNCMN CICS named counter server program
//STEPLIB DD DSN=CICSTS31.CICS.SDFHAUTH,DISP=SHR Authorized library
//SYSPRINT DD SYSOUT=* Options, messages and statistics
//DFHNCRL DD DSN=NC1.UNLOADED.POOL,DISP=OLD Unloaded pool
//SYSIN DD *
FUNCTION=RELOAD Function to be performed is RELOAD
POOLNAME=PRODNC1 Pool name
/*