next up previous contents index
Next: Copy a data Up: Description of user Previous: Input an array

Operations on keys and cycles

Purge old cycles

CALL RZPURG (NKEEP)

NKEEP
Number of cycles which must be kept for the given key
If NKEEP < 1 then NKEEP is taken to be 1 and only the highest cycle is kept

This command can be compared with the PURGE command on the VAX/VMS system. All but the last NKEEP cycles of all key are deleted from the CWD by a call to RZPURG.

RZPURG return codes

IQUEST(9)
Number of records still available in the current subdirectory

IQUEST(11)
Maximum number of cycles purged
IQUEST(12)
Number of words freed
IQUEST(13)
Number of records freed

Delete a subtree from the current working directory

CALL RZDELT (CHDIR)

CHDIR
Character variable specifying the directory name of the subtree of the CWD.

A subtree of the CWD can be deleted by a call to RZDELT

RZDELT return codes

IQUEST(1)
Error status
0
Normal completion
1
Invalid directory subtree name

Delete a key from the current working directory

CALL RZDELK (KEY,ICYCLE,CHOPT)

KEY
Key array of dimension NWKEY (see RZMDIR)
ICYCLE
Cycle number of the key to be deleted
>0
highest cycle number means delete the highest cycle
=0
means delete the lowest cycle
=-1,-2,...
means delete the highest cycle -1, -2,...
CHOPT
Character variable specifying the options selected.
' '
Delete the explicitly specified cycle ICYCLE only (default).
If cycle ICYCLE does not exist, no action is taken.
'C'
Delete all cycles corresponding to key ( ICYCLE not used)
'K'
Delete all keys in the CWD ( ICYCLE and KEY not used)
'S'
Delete all cycles smaller than cycle ICYCLE for the given key-vector

When a key-cycle pair has to be deleted from the CWD a call to RZDELK must be made

RZDELK return codes

IQUEST(1)
Operation status code
1
No entry for key/cycle pair specified
0
normal completion
IQUEST(11)
Maximum number of cycles deleted
IQUEST(12)
Number of words freed
IQUEST(13)
Number of records freed
Examples:
CALL RZDELK(KEY,2,' ') deletes the information associated with key KEYand cycle number 2 in the CWD.
CALL RZDELK(KEY,4,'S') deletes all information associated with key KEYand a cycle number smaller than 4 in the CWD.
CALL RZDELK(0,0,'K') deletes all cycles of all keys in the CWD.

Rename a key in the current working directory

CALL RZRENK (KEYOLD,KEYNEW)

KEYOLD
Key array of dimension NWKEY containing the old key vector
KEYNEW
Key array of dimension NWKEY containing the new key vector

A key in the CWD can be renamed by a call to RZRENK

Return codes

IQUEST(1)
Operation status code
1
No entry for KEYOLD in the CWD
0
normal completion

Retrieve the keys associated to the current working directory

CALL RZKEYS (MAXDIM,MAXKEY,KEYS*,NKEYS*)

Input parameter description:

MAXDIM
The actual first dimension of output array KEYS. It should in principle be at least equal to the number of key elements NWKEY as declared to RZMDIR.
MAXKEY
The actual second dimension of output array KEYS.

Output parameter description:

KEYS*
A 2-dimensional array dimensioned KEYS(MAXDIM,MAXKEY). It will contain the key vectors associated with the CWD. Its first index runs over the key elements for a given key, while its second index runs over the different keys.
NKEYS*
Number of keys returned in array KEYS.

Subroutine RZKEYS returns the list of keys created in the CWD. The keys are returned in historical order.

Return codes

IQUEST(1)
Error status
0
Normal completion
1
The keys have a length NWKEY > MAXKEY or more entries present in the directory than returned in KEYS (see IQUEST(11)).

IQUEST(11)
Actual number of keys in the CWD.
IQUEST(12)
NWKEY, number of words characterizing a key vector element for the CWD (as defined on Page gif for RZMDIR).

Examples

For the lead glass blocks file in the example in section 1, we could write:

      INTEGER KEYS(5000)
 
      CALL RZKEYS(1,5000,KEYS,NKEYS)
For the events to be scanned we could have:
      INTEGER KEYS(2,500)                      ! Up to 500 keys vectors
 
      CALL RZKEYS(2,500,KEYS,NKEYS)



next up previous contents index
Next: Copy a data Up: Description of user Previous: Input an array


Janne Saarela
Mon May 15 08:34:47 METDST 1995