Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (A-B)
Guardian Procedure Calls Reference Manual522629-013
2-31
ALTER Procedure
(Superseded by FILE_ALTERLIST_ Procedure )
OSS Considerations
This procedure operates only on Guardian objects. If an OSS file is specified,
error 1163 occurs.
Example
INT fname[0:11] := ["$data foo bar "];
INT change^filecode := 1;
INT newcode := 101;
.
.
CALL ALTER( fname, change^filecode, newcode );! see Table 2-2
IF <> THEN ...
6
Partitions: Change the partitioning description of the file. The
newvalue
parameter should be an array in the same format as the
partition-params
array of the CREATE procedure. The partition description can be changed
only in the following ways:
a) The volume name of an existing partition may change.
b) For a key-sequenced file, the extent sizes of a partition may be changed.
c) For non-key-sequenced files, new partitions may be added.
This function changes the description only in the primary file; no secondary
partitions are moved, updated, or created. The
partonly parameter must be
zero for this function.
This function is not supported for format 2 files.
7
Broken Flag: Resets the broken flag (which is shown in
open-flags2.<6> of
FILEINFO or item 78 from FILE_GETINFOLIST[BYNAME
]_). The
newvalue parameter must be a one-word binary number with a value of 0.
For a partitioned file, the
partonly parameter must have a value of 1 for this
function.
8
Expiration Date: Change the expiration date associated with the file to the
one given in
newvalue. The newvalue parameter must be a 4-word GMT
timestamp.
The expiration date is not changed for associated alternate key files, but is
changed for the secondary partitions of a partitioned file (unless the value of
partonly is 1). The expiration date for a temporary file cannot be set with
ALTER, since temporary files must be purged when closed.
Table 2-2. ALTER Function Codes (page 2 of 2)
Code Description