This function can be used to close a PAM file. The file to be closed is identified by the short ID (OPENID) that was returned by OPEN.
The CLOSE function evaluates only the function operands described below.
Format FCT=*CLOSE
Operation | Operands |
|
|
| |
| |
|
Operand descriptions
FCT
Defines the FASTPAM function to be executed.
Only a direct specification is allowed for the MF=L form.
= *CLOSE
Direct specification of the “Close file” function.
This function can be used to close a PAM file by calling it with the short ID (OPENID) that was returned by OPEN.
= addr
Symbolic address of a 1-byte field containing the value for the CLOSE function.
= (r)
Register containing the value for the CLOSE function.
LASTBLK
This parameter allows the user to explicitly set the last logical block of the file, provided the user has opened the file with MODE=*INOUT/*OUTIN and SHARUPD=*NO. The specified block must lie within the file.
Only a direct specification is allowed for the MF=L form.
= nmbr
Direct entry of a decimal numeric value for the last 4K block of the file.
= addr
Symbolic address of a 4-byte field containing the numeric value (binary) for the last4-Kbyte-block of the file.
= (r)
Register containing the numeric value for LASTBLK.
MACID
See the description under the format FCT=*ENAENV on "FASTPAM function: ENABLE ENVIRONMENT".
MF
The forms of the MF operand are described in detail in the appendix on "Macro types".
PARAM
See the description under the format FCT=*ENAENV on "FASTPAM function: ENABLE ENVIRONMENT".
PREFIX
See the description under the format FCT=*ENAENV on "FASTPAM function: ENABLE ENVIRONMENT".
OPENID
Refers to the short ID of the OPEN for which this CLOSE function is to be executed.If the same parameter list is used as for the OPEN, the short ID need not be specified, since it will already be contained in the FPAMOPID field of the parameter list.
Only a direct specification is allowed for the MF=L form.
= nmbr
Direct entry of a decimal numeric value for the OPENID.
= addr
Address of a 4-byte field containing the short ID.
= (r)
Register containing the short ID.
Possible return codes of the FASTPAM function FCT=*CLOSE
Standard header: ccbbaaaa
The following code relating to execution of the FPAMSRV macro is returned in the standard header (cc = SUBCODE2, bb = SUBCODE1, aaaa = MAINCODE):
X'cc' | X'bb' | X'aaaa' | Meaning |
X'00' | X'0000' | Function executed successfully. | |
X'01' | X'0011' | Function not executed. | |
X'01' | X'0013' | Function not executed. | |
X'20' | X'0028' | Function not executed. | |
X'40' | X'0033' | General DMS error during OPEN/CLOSE. The DMS return code is passed in the field FPAMDMSC. | |
X'40' | X'004E' | When calling FPAMSRV with the *CLOSE function, the operand LASTBLK was specified. This operand is ignored, since the file was opened with MODE=*INPUT or SHARUPD=*YES. | |
X'40' | X'0059' | A TU task is using a TPR-OPEN-ID. |