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 tFigure 1. Values specific to this category of I/O are shown in the comment beside the structure element. Additional notes pertaining to this category of I/O follow the figure.

For more information on the fldata() function, refer to 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, /* N/A -- always off           */
                    __dsorgHFS :    1, /* N/A -- always off           */
                    __openmode :    2, /* one of:                     */
                                       /* __TEXT                      */
                                       /* __BINARY                    */
                                       /* __RECORD                    */
                    __modeflag :    4, /* combination of:             */
                                       /* __READ                      */
                                       /* __WRITE                     */
                                       /* __APPEND                    */
                    __dsorgPDSE:    1, /* N/A -- always off           */
                    __reserve2 :    8; /*                             */
     __device_t     __device;          /* __TERMINAL                  */
     unsigned long  __blksize,         /*                             */
                    __maxreclen;       /*                             */
     unsigned short __vsamtype;        /* N/A                         */
     unsigned long  __vsamkeylen;      /* N/A                         */
     unsigned long  __vsamRKP;         /* N/A                         */
     char *         __dsname;          /* N/A -- always NULL          */
     unsigned int   __reserve4;        /*                             */
};
typedef struct __fileData fldata_t;
Notes:
  1. The filename value is dd:ddname if the file is opened by ddname; otherwise, the value is *. The ddname is uppercase.
  2. Either __recfmF, __recfmV, or __recfmU will be set according to the recfm parameter specified on the fopen() or freopen() function call.