fldata() behavior

The format of the fldata() function is as follows:
int fldata(FILE *file, char *filename, fldata_t *info);

The fldata() function is used to retrieve information about an open stream. The name of the file is returned in filename and other information is returned in the fldata_t structure, shown in Figure 1. Values specific to this category of I/O are shown in the comment beside the structure element. Other notes about this category of I/O follow the figure. For more information on the fldata() function, see z/OS XL C/C++ Runtime Library Reference.

Figure 1. fldata() structure
struct __fileData {
     unsigned int   __recfmF   :    1, /*                             */
                    __recfmV   :    1, /*                             */
                    __recfmU   :    1, /*                             */
                    __recfmS   :    1, /* always off                  */
                    __recfmBlk :    1, /* always off                  */
                    __recfmASA :    1, /* always off                  */
                    __recfmM   :    1, /* always off                  */
                    __dsorgPO  :    1, /* N/A -- always off           */
                    __dsorgPDSmem : 1, /* N/A -- always off           */
                    __dsorgPDSdir : 1, /* N/A -- always off           */
                    __dsorgPS  :    1, /* N/A -- always off           */
                    __dsorgConcat : 1, /* N/A -- always off           */
                    __dsorgMem :    1, /* N/A -- always off           */
                    __dsorgHiper  : 1, /* N/A -- always off           */
                    __dsorgTemp:    1, /* N/A -- always off           */
                    __dsorgVSAM:    1, /* always on                   */

		 #if __TARGET_LIB__ >= __EDC_LE  /*                             */
                    __dsorgHFS :    1, /*                             */
                #else
                    __reserve1 :    1, /*                             */
                #endif
                    __openmode :    2, /* one of:                     */
                                       /* __TEXT                      */
                                       /* __BINARY                    */
                                       /* __RECORD                    */
                    __modeflag :    4, /* combination of:             */
                                       /* __READ                      */
                                       /* __WRITE                     */
                                       /* __APPEND                    */
                                       /* __UPDATE                    */
                    __dsorgPDSE:    1, /* N/A -- always off           */
                    __vsamRLS :     3, /* One of:                     */
                                       /* __NORLS                     */
                                       /* __RLS                       */
	 #if __EDC_TARGET >= 0x41080000     /*                             */
                   __vsamEA  :     1,  /*                             */
                   __reserve2 :    4;  /*                             */
                 #else
                   __reserve3 :    5;  /*                             */
                 #endif

       __device_t     __device;        /*                             */
       unsigned long  __blksize,       /*                             */
                      __maxreclen;     /*                             */
       union {                         /*                             */
         struct {                                 /*                  */
           unsigned short __vsam_type;            /*                  */
           unsigned long  __vsam_keylen;          /*                  */
           unsigned long  __vsam_RKP;             /*                  */
         } __vsam;                                /*                  */
       #if __EDC_TARGET >= 0x41080000             /*                  */
         struct {                                 /*                  */
           unsigned char  __disk_access_method;   /*                  */
           unsigned char  __disk_noseek_to_seek;  /*                  */
           long           __disk_reserve[2];      /*                  */
         } __disk;
       #endif
       } __device_specific;

     char *         __dsname;          /*                             */
     unsigned int   __reserve4;        /*                             */
};
typedef struct __fileData fldata_t;
Notes:
  1. If you have opened the file by its data set name, the filename is fully qualified, including quotation marks. If you have opened the file by ddname, filename is dd:ddname, without any quotation marks. The ddname is uppercase.
  2. The __dsname field is filled in with the data set name. The __dsname value is uppercase unless the asis option was specified on the fopen() or freopen() function call.