Returns open dataset information.
int __getdcb (int handle, unsigned char * dsorg, unsigned char * recfm, unsigned char * keylen, unsigned short * lrecl, unsigned short * blksize);
Required Header |
<io.h> |
Return Value
This function returns 0 if the operation was successful. -1 indicates an error.
Parameters
handle
The low level I/O handle to the open file
dsorg
An optional pointer to store the dsorg
recfm
An optional pointer to store the recfm
keylen
An optional pointer to store the keylen
lrecl
An optional pointer to store the lrecl
blksize
An optional pointer to store the blksize
Remarks
The __getdcb function stores the desired dcb attributes at the pointer locations provided. NULL may be passed for any of the parameters if that value isn't required.
dsorg will have the value 0x40 for Physical-Sequential datasets, and 0x02 for Partitioned-Organised datasets. If the dataset type in not known (eg. a DD which may/may-not be defined with a member name) then the PS code is returned.
recfm has one of the following values:
0x40 = V
0x50 = VB
0x80 = F
0x90 = FB
0xC0 = U
Use _fileno to get the low-level handle of a stream.