Deleting information from the database

Deleting a range of objects

               +------------------------------------------+
               |CALL  CDPURG (PATH,KYDAT,KYTIM,CHOPT,IRC*) |
               +------------------------------------------+
                                  

PATH
Character string describing the pathname
KYDAT
Key element number (for option CHOPT) or Minimum value of Key 1 to be deleted (for option S)
KYTIM
Cutoff value for the key (for option K) or Maximum value of Key 1 to be deleted (for option S)
CHOPT
Character string with any of the following characters
'A'
Deletes all data objects
'K'
Deletes all data objects for which KEY(KYDAT)
'L'
Deletes all but the last (one with highest KEY(1) value) data objects
'P'
Deletes all data objects with identical start and end validity but those having the highest Program Version number (i.e., KEY(6) value)
'S'
Deletes all data objects with Serial number (KEY(1)) in the range KYDAT-KYTIM (the terminal points included)
IRC
Integer return code
0
Normal completion
111
Illegal path name
112
No key or data found for specified path

If the pathname begins with a % character then it is assumed to be an alias and is automatically translated by the internal HEPDB routines.

Supplementary return information

IQUEST(2)
Number of objects deleted (if IRC = 0)

Deleting objects based on key vector

             +----------------------------------------------+
             |CALL  CDPURK (PATH,ISEL,IMASK,KEYS,CHOPT,IRC*) |
             +----------------------------------------------+
                                  

PATH
Character string describing the pathname
ISEL
Vector of length NPAIR specifying the validity instant. Only objects valid for this instant of validity are candidates for purging.
IMASK
Integer vector specifying which elements of the KEYS vector are to be considered.
KEYS
Vector of keys. Only the elements for which the corresponding element of IMASK is non-zero are assumed to contain useful information
CHOPT
Character string with any of the following characters
'K'
Delete object with key serial number as given in IMASK is ignored.
'F'
Require a full match of the entire KEYS vector. IMASK is ignored.
'U'
Undelete a previously deleted object.
IRC
Integer return code
0
Normal completion
111
Illegal path name
112
No key for the path name satisfying the Key assignments
113
Illegal character option
114
Valid data objects in the Node/Key structure

Routine CDPURK deletes objects in a directory path name steered by a selection on a number of key elements. The elements are specified by a non-zero value in the corresponding element of the IMASK vector. If the pathname begins with a % character then it is assumed to be an alias and is automatically translated by the internal HEPDB routines.

Supplementary return information

IQUEST(2)
Number of objects deleted (if IRC = 0)