The fstat callable service obtains status information about a file. You identify the file by its file descriptor.
Operation | Environment |
---|---|
Authorization: | Supervisor state or problem state, any PSW key |
Dispatchable unit mode: | Task |
Cross memory mode: | PASN = HASN |
AMODE (BPX1FST): | 31-bit |
AMODE (BPX4FST): | 64-bit |
ASC mode: | Primary mode |
Interrupt status: | Enabled for interrupts |
Locks: | Unlocked |
Control parameters: | All parameters must be addressable by the caller and in the primary address space. |
|
AMODE 64 callers use BPX4FST with the same parameters.
The name of a fullword that contains the file descriptor for the file.
The name of a fullword that contains the length of the area to which the fstat call returns Status_area. To determine the value of Status_area_length, use the BPXYSTAT macro (see BPXYSTAT — Map the response structure for stat).
The name of an area to which the fstat call returns the status information for the file. Status_area is mapped by the BPXYSTAT macro. For information on the contents of this macro, see BPXYSTAT — Map the response structure for stat.
The name of a fullword where the fstat service returns 0 if the request is successful, or -1 if it is not successful.
Return_code | Explanation |
---|---|
EBADF | The File_descriptor parameter does not identify a known file. One possible reason for this is that the file descriptor specified is from an opendir instead of an open, in which case JrNotForDir is returned as the reason code. |
EINVAL | Parameter error; for example, a zero-length buffer was passed. The following reason code can accompany the return code: JRBuffTooSmall. |
The name of a fullword in which the fstat service stores the reason code. The fstat service returns Reason_code only if Return_value is -1. Reason_code further qualifies the Return_code value. For the reason codes, see z/OS UNIX System Services Messages and Codes.
There are no restrictions on the use of the fstat service.
For an example using this callable service, see BPX1FST (fstat) example.