Guardian Procedure Calls Reference Manual
Table 4 ALTER Function Codes (continued)
DescriptionCode
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.
Considerations
• The file cannot be opened when ALTER is called.
• The security on the file must allow the caller to have read and write access.
• If the characteristic already has the supplied value, no error is indicated.
• The ALTER procedure supports format 2 files, except for changing alternate key or partition
descriptions (functions 5 and 6 of Table 4).
• Except as noted in Table 4, the alterations are not made to alternate-key files, but are made
to secondary partitions of a partitioned file unless the value of partonly is 1.
• A secondary partition can be changed only if the value of partonly is 1.
• If a partition (or alternate-key file) is not accessible, error 3 (or 4) will result, but the accessible
partitions (or files) will still be updated.
• If the secondary partition of the file is audited differently from the primary (one is audited and
the other is not), error 80 is returned and you cannot alter the audit flag.
• The ALTER procedure can alter the partition and alternate key information of only a format 1
file; therefore any attempt to alter the partition or alternate key information of a format 2
key-sequenced file with increased limits continues to be rejected. Other operations supported
by ALTER can be used on key-sequenced files with increased limits in H06.28/J06.17 RVUs
with specific SPRs and later RVUs. (For a list of the required H06.28/J06.17 SPRs, see SPR
Requirements for Increased Enscribe Limits for the H06.28/J06.17 Release (page 31).)
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 4 (page 65)
IF <> THEN ...
66 Guardian Procedure Calls (A-B)