Hold Process

When you create an archive file you may not need to retain all rows in the file for the same amount of time. Some rows may need to be retained for a year, and the remaining rows for a different time span. With the File Maintenance Hold process you can specify criteria to create a new archive file, while the original, or source, file remains unchanged. You can then apply a different retention policy for each file.

Command file syntax for the Hold process is:

[//comment ]
[ OPTIMDIR optimdirectory ]
AF {arcservername | (local)} arcfilename 
HOLDAF filename [ HOLDAFX filename]
AD adname | { [SQL dbalias.cid.tblname sql]
              [VAR variablename value] [PNS pnsfile]}
REGISTER { ((optimdirectory| *) [GROUP groupidentifier][DESC description ])| NO }
[ COLLECTIONS collection1,...,collectionn]
RUN ARCHIVEHOLD
//
At the beginning of a line, indicates that the text following the slashes is a comment. Enter comment text on one line, anywhere in the command file.
OPTIMDIR
Optim™ Directory for the archive files created by this process. The default is the Optim Directory where the source archive file resides.
AF
Name of the archive file that is the source for this process. This parameter is required. Specify:
arcservername
Name of the server for the source archive file.
(local)
Specify (local) if the source archive file is not associated with a server.
arcfilename
Name of the source archive file. The archive file must be registered in the Optim Directory specified in the OPTIMDIR parameter.
HOLDAF
Name of the archive file this process creates, based on hold criteria. The name you specify must not be an existing file name on the server.
HOLDAFX
Name of the archive index file this process creates. This parameter is optional. An archive index is created if the Access Definition being used defines indexes.
AD
Name of an existing Access Definition in the Optim Directory. Selection criteria in this Access Definition is used by this process to create the new file. Specify:
adname
Name of an existing Access Definition. The criteria in this Access Definition is used to create the HOLDAF.
Note:
  • If you use the AD parameter, you cannot use the SQL, VAR, or PNS parameters.
  • This command process block must include the AD parameter or SQL, VAR, or PNS.
.
SQL
SQL that results in a valid WHERE clause to be executed against the Access Definition start table. This SQL is used instead of any SQL that exists in the Access Definition that was used to create the source AF. Specify:
dbalias.cid.tblname
DB alias, creator ID and table name that is the target of the WHERE clause.
VAR
Provide one or more values for substitution variables used in the SQL WHICH clause. The variables must exist in the Access Definition.
PNS
Name of a point-and-shoot file. Provide the name of a file local to the Optim server, that contains one or more start table key values. You can use this parameter as the only criteria for the expire process or in addition to SQL and VAR.
REGISTER
Option for registering the HOLDAF. This parameter is required. Specify:
optimdir
Name of the directory in which to register the HOLDAF.
*
Register HOLDAF to the same directory as the source AF.
GROUP
1 to eight-character name of the group for the HOLDAF.
DESC
Description to associate with the HOLDAF registry entry.
NO
Do not register the HOLDAF in a directory.
COLLECTIONS
Specify this parameter to add the HOLDAF to one or more collections. Collections must exist in the Optim Directory specified in the REGISTER parameter. COLLECTIONS parameter is valid only if the HOLDAF is registered.

Examples:

SQL ORA_ALIASTP.RAJANI.OPTIM_ITEMS ITEM_ID LIKE ’DR%’
HOLDAF contains all the rows with ITEM_ID like ’DR’
SQL ORA_ALIASTP.RAJANI.OPTIM_ITEMS ITEM_ID LIKE ’DR%’ VAR ORDIDVAR 200
The AF was created with the criteria ORDER_ID>:ORDIDVAR, where the value of ORDIDVAR was 100. This Hold process overwrites the value of ORDIDVAR. The criteria are logically ANDed, so the HOLDAF contains rows whose ITEM_IDs are like ’DR’ and ORDER_IDs are greater than 200.


Feedback