To Generate a Purge/Archive Directives File

  1. Run the –generate command parameter for a selected object type. For example:

    diet –generate case -auto_unique –export case.arc

    This will generate a very large case.arc prototype file that is the starting point for a usable purge/archive directives file.

    Note: The generated file does not have unique keys by default. While it is not required, it is highly recommended that the –auto_unique command parameter be used on the command line, as shown above. This parameter will generate, when possible, unique keys for the objects. If a unique key cannot be determined on a reference object, the objid will be used and a warning issued. Unique keys containing objid as a unique field will be ignored for this first generation, unless the –objid command parameter is used. Warnings will be issued for references that do not have unique keys. See the Common Objects that Need Unique Keys section for more information.

  2. Review the generated file. Take note of the relations that TO clauses should not be generated for, such as for objects that do not exist in your database. Place these in the no_gen file, so that they will not be generated in the next pass. See the no_gen File section for more information.
  3. Run the –generate command again, and include the no_gen file. For example:

    diet –generate case –auto_unique –no_gen case.no_gen –export case.arc
  4. Repeat steps 2 and 3, continuing to add more objects and relations to the no_gen file.
  5. During the last few passes, as the purge/archive directives file gets closer to the final version, add these instructions to the no_gen file:
  6. In the last pass, add any required stop_if statements to the no_gen file.
  7. Check the file carefully; the generated routines might have to be manually removed, edited, or added.
  8. Update the checksum in the final directive file. See the Updating the Checksum section for more information.
  9. Test the generated directive file with the –archive command parameter before using it for a –purge.

See Also

Generating Purge/Archive Directives Files

no_gen File

Sample Files Shipped with ArchiveManager

Next

no_gen File

To Generate a Purge/Archive Directives File