BPX1FST (fstat) example

The following code gets the file status for the file opened as FILEDESC. For the callable service, see fstat (BPX1FST, BPX4FST) — Get status information about a file by descriptor. For the data structure, see BPXYSTAT — Map the response structure for stat. AMODE 64 callers use BPX4FST (fstat) example.
                                              
       MVC   FILEDESC,..           File descriptor from open          17
         SPACE ,                                                        
         CALL  BPX1FST,              Get file status of file descriptor+
               (FILEDESC,            Input: File descriptor            +
               STATL,                Input: Length of buffer needed    +
               STAT,                 Buffer, mapped by BPXYSTAT        +
               RETVAL,               Return value: 0 or -1             +
               RETCODE,              Return code                       +
               RSNCODE),             Reason code                       +
               VL,MF=(E,PLIST)       ----------------------------------