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. Additional notes follow the figure. For more information
on the
fldata() function,
refer to
z/OS XL C/C++ Runtime Library Reference.
Figure 1. fldata() Structurestruct __fileData {
unsigned int __recfmF : 1, /* */
__recfmV : 1, /* */
__recfmU : 1, /* */
__recfmS : 1, /* */
__recfmBlk : 1, /* */
__recfmASA : 1, /* */
__recfmM : 1, /* */
__dsorgPO : 1, /* */
__dsorgPDSmem : 1, /* */
__dsorgPDSdir : 1, /* */
__dsorgPS : 1, /* */
__dsorgConcat : 1, /* */
__dsorgMem : 1, /* N/A -- always off */
__dsorgHiper : 1, /* N/A -- always off */
__dsorgTemp: 1, /* */
__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 */
/* __UPDATE */
__dsorgPDSE: 1, /* N/A -- always off */
__vsamRLS : 3, /* N/A */
#if __EDC_TARGET >= 0x41080000 */
__vsamEA : 1, */
__recfmB : 1, */
__reserve2: 3; */
#else */
__reserve3: 5; */
#endif */
__device_t __device; /* one of: */
/* __DISK */
/* __TAPE */
/* __PRINTER */
/* __DUMMY */
/* __OTHER */
unsigned long __blksize, /* */
__maxreclen; /* */
union { /* */
struct { /* */
unsigned short __vsam_type; /* N/A */
unsigned long __vsam_keylen; /* N/A */
unsigned long __vsam_RKP; /* N/A */
} __vsam; /* */
struct { /* */
unsigned short __disk_vsam_type; /* */
unsigned char __disk_access_method; /* */
unsigned char __disk_noseek_to_seek; /* */
long __disk_reserve[2]; /* */
} __disk; /* */
} __device_specific; /* */
char * __dsname; /* */
unsigned int __reserve4; /* */
};
typedef struct __fileData fldata_t;
Notes: - If you have opened the file by its data set name, 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.
If you specified a member on the fopen() or freopen() function
call, the member is returned as part of filename.
- Any of the __recfm bits may be set on for OS
files.
- The __dsorgPO bit will be set on only if you
are reading a directory or member of a partitioned data set, either
regular or extended, regardless of whether the member is specified
on a DD statement or on the fopen() or freopen() function
call. The __dsorgPS bit will be set on for all other
OS files.
- The __dsorgPDSE bit will be set when processing
an extended partitioned data set (PDSE).
- The __dsorgConcat bit will be set on for a concatenation
of sequential data sets, but not for a concatenation of partitioned
data sets.
- The __dsorgTemp bit will be set on only if the
file was created using the tmpfile() function.
- The __blksize value may include BDW and RDWs.
- The __maxreclen value may include the ASA character.
- The __recfm bits and the __blksize and __maxreclen values
correspond to the attributes of the open stream. They do not necessarily
reflect the attributes of the existing data set.
- The __dsname field is filled in for __DISK files
with the data set name. The member name is added if the file is a
member of a partitioned data set, either regular or extended. The __dsname value
is uppercase unless the asis option was specified on the fopen() or freopen() function
call. The __dsname field is set to NULL for all other
OS files.