fldata() behavior

The fldata() function is used to retrieve information about an open stream; it has the following format:
int fldata(FILE *file, char *filename, fldata_t *info);

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. Additional notes pertaining to this category of I/O follow. 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, /* always on                   */
                    __recfmV   :    1, /* always off                  */
                    __recfmU   :    1, /* always off                  */
                    __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, /*                             */
                    __dsorgHiper  : 1, /*                             */
                    __dsorgTemp:    1, /* N/A -- always off           */
                    __dsorgVSAM:    1, /* N/A -- always off           */
                    __dsorgHFS :    1, /* N/A -- always off           */
                    __openmode :    2, /* __BINARY                    */
                    __modeflag :    4, /* combination of:             */
                                       /* __READ                      */
                                       /* __WRITE                     */
                                       /* __APPEND                    */
                                       /* __UPDATE                    */
                    __dsorgPDSE:    1, /* N/A -- always off           */
                    __reserve2 :    8; /*                             */
     __device_t     __device;          /* one of:                     */
                                       /* __MEMORY                    */
                                       /* __HIPERSPACE                */
     unsigned long  __blksize,         /*                             */
                    __maxreclen;       /*                             */
     unsigned short __vsamtype;        /* N/A                         */
     unsigned long  __vsamkeylen;      /* N/A                         */
     unsigned long  __vsamRKP;         /* N/A                         */
     char *         __dsname;          /*                             */
     unsigned int   __reserve4;        /*                             */
};
typedef struct __fileData fldata_t;
Notes:
  1. The filename is the fully qualified version of the filename specified on the fopen() or freopen() function call. There are no quotation marks. However, if the filename specified on the fopen() or freopen() function call begins with an *, a unique filename is generated in the format ((n)), where n is an integer.
  2. The __dsorgMem bit will be set on only for regular memory files.
  3. The __dsorgHiper bit will be set on only for hiperspace memory files.
  4. The __dsname is identical to the filename value.