Deletes all but the highest version of specified dictionary objects. Format [ path-name [,...] ] PURGE [ ALL ] [KEEP [=] n] [ ]
1 – Arguments
path-name Specifies the object you want to purge. The path name must include the name of a domain, record, procedure, or table. The path name cannot contain a version number or a semicolon. If you do not specify a path name, DEC DATATRIEVE purges all objects in your default dictionary directory. PURGE accepts both DMU and CDO style path names. ALL Purges all the definitions in the default dictionary directory. ALL is the default. KEEP [=] n Specifies the number of versions of each object you want to keep. The number must be greater than zero. The default is KEEP=1.
2 – Examples
The following example shows how PURGE deletes all but the highest versions of objects in a user's DMU format directory: DTR> SHOW ALL Domains: * FAMILIES;3 * FAMILIES;2 * FAMILIES;1 * OWNERS;2 * OWNERS;1 * PETS;2 * PETS;1 * PROJECTS;3 * PROJECTS;2 * PROJECTS;1 * YACHTS;5 * YACHTS;4 Records: * FAMILY_REC;2 * FAMILY_REC;1 * OWNER_RECORD;2 * OWNER_RECORD;1 * PET_REC;1 * PROJECT_REC;1 * YACHT;2 * YACHT;1 The default directory is CDD$TOP.DTR$USERS.BELL No established collections. No ready sources. No loaded tables. DTR> PURGE DTR> SHOW DOMAINS, RECORDS Domains: * FAMILIES;3 * OWNERS;2 * PETS;2 * PROJECTS;3 * YACHTS;5 Records: * FAMILY_REC;2 * OWNER_RECORD;2 * PET_REC;1 * PROJECT_REC;1 * YACHT;2 DTR> The following example shows the error message generated if you specify a dictionary directory as the final object in the path name. It then shows how PURGE works with the path name and KEEP arguments. DTR> SHOW DICTIONARY The default directory is CDD$TOP.DTR$USERS.BELL DTR> PURGE CDD$TOP.DTR$USERS.BELL Element "CDD$TOP.DTR$USERS.BELL" is not a Domain, Record, Procedure, or Table. No objects purged for dictionary element "CDD$TOP.DTR$USERS.BELL". DTR> SHOW RECORDS Records: * FAMILY_REC;4 * FAMILY_REC;3 * FAMILY_REC;2 * FAMILY_REC;1 * OWNER_RECORD;2 * OWNER_RECORD;1 * PET_REC;1 * PROJECT_REC;1 * YACHT;2 * YACHT;1 DTR> PURGE CDD$TOP.DTR$USERS.BELL.FAMILY_REC KEEP=2 DTR> SHOW RECORDS Records: * FAMILY_REC;4 * FAMILY_REC;3 * OWNER_RECORD;2 * OWNER_RECORD;1 * PET_REC;1 * PROJECT_REC;1 * YACHT;2 * YACHT;1 DTR>