Macro type: type S (E form/L form/D form/C form); see "Macro types"
The DELAIX macro deletes a selected secondary key or all secondary keys in an NK-ISAM file.
Deleting a secondary key does not mean that the values of this key are deleted from the records. Instead, the secondary index blocks belonging to the secondary key(s) are deleted, which means that access to the records via the secondary key(s) is no longer possible.
Format
Operation | Operands |
|
|
| |
| |
|
Operand descriptions
FILE = pathname
Specifies the NK-ISAM file from which the secondary key(s) specified for KEYNAME is/are to be deleted, with: <c-string 1..54: filename 1..54>.
The value specified for the FILE operand is ignored if the LINK operand is also specified.
pathname means [:catid:][$userid.]filename
catid
Catalog ID: if omitted, the default catalog ID for the current user ID is assumed.
userid
User ID: if omitted, the user ID in the SET-LOGON-PARAMETERS or LOGON command is assumed.
filename
Fully qualified file name.
KEYNAME
Specifies which secondary key(s) is/are to be deleted.
= (keyname1[,keyname2,...])
All secondary keys whose names are included in the list are deleted. The secondary keys with the names “keyname1”, “keyname2”, etc. must have been defined for the file specified in the FILE or LINK operand. The user can determine the names and attributes of all secondary keys defined for a file with the aid of the SHOWAIX macro or of the SHOW-INDEX-ATTRIBUTES command.
The parentheses in the list format may be omitted if the list contains only one name.
= *ALL
All secondary keys defined for the file specified in the FILE or LINK operand are deleted.
LINK = linkname
Specifies the link name for the file from which the secondary key(s) specified in the KEYNAME operand is/are to be deleted.
“linkname” may be up to eight characters long. If the file link name is to be addressed via the command interface, it must correspond to the data type <structured_name 1..8> (see the “Commands” manual [3]).
MACID
Defines the second through fourth characters of each field name and equate generated when the macro is expanded.
Default value: | MACID = IST |
= macid
Three-character string defining the second through fourth characters of the generated field names and equates.
PARAM
Specifies the address of the operand list; it is evaluated only if MF=E applies (see "Macro types").
= addr
Symbolic address (name) of the operand list.
= (r)
Number of the register which contains the address of the operand list. The register must be loaded with this address value before the macro is called.
PREFIX
Defines the first character of each field name and equate generated in the data area when the macro is expanded.
Default value: | PREFIX = D |
= pre
One-character prefix with which the generated field names and equates are to begin.
Return codes
Standard header: ccbbaaaa
The following code relating to execution of the DELAIX macro is returned in the standard header (cc = SUBCODE2, bb = SUBCODE1, aaaa = MAINCODE):
X'bb' | X'aaaa' | Meaning |
X'00' | X'0000' | The function was executed successfully. |
X'01' | X'0001' | The function could not be executed: the operand list is not available. |
X'40' | X'0002' | The function could not be executed: secondary keys are not supported in the remote system (if the macro is called via RFA). |
X'40' | X'0003' | The function could not be executed: the specified catalog ID does not exist. |
X'40' | X'0004' | The function could not be executed: the catalog cannot be accessed. |
X'01' | X'0005' | The function could not be executed: the operand list contains an invalid name. |
X'40' | X'0008' | The function could not be executed: the specified secondary key does not exist. |
X'20' | X'000B' | The function could not be executed: system error. |
X'40' | X'000C' | The function could not be executed: the user address space is too small. |
X'40' | X'000E' | The function could not be executed: the control block of the file is errored. |
X'40' | X'0012' | The function could not be executed: the ISAM pool is overloaded. |
X'40' | X'0016' | The function could not be executed: an invalid number of key names was specified for KEYNAM. |
X'01' | X'0017' | The function could not be executed: there was no file specified in the operand list. |
X'40' | X'0018' | The function could not be executed: the file was set to SHARUPD=YES when the macro was called. |
X'40' | X'0019' | The function could not be executed: the file link name is invalid. |
X'40' | X'0040' | The function could not be executed: OPEN error. |
X'40' | X'0041' | The function could not be executed: CLOSE error. |
X'40' | X'0044' | The function could not be executed: the file is not an NK-ISAM file. |
Further return codes, whose meanings are defined by conventions valid for all macros, can be found in the table on "Standard header" (standard header).
The calling program is terminated if one of the following errors occurs with respect to the parameter list:
the list is not assigned to the caller
the list is not aligned on a word boundary
the list is write-protected.