Using KSAM/XL and KSAM 64 (32650-90886)

82 Chapter9
KSAM Intrinsics
FFILEINFO
2 U16 File options: Returns file characteristics (refer to the
FFfoption
figure).
The record format extension bit is returned as the
foption
(1:1) bit. Byte stream
record format is represented as a record format extension of one with a variable
record format
foption
(8:2) bits equal to 01.
Directories, symbolic links, device links, pipes and FIFO's can not be represented
by
foptions
. If the object referenced by
filenum
is one of these objects, a CCL
condition code is returned. Calling FCHECK for
filenum
after this error occurs will
result in error.
3 U16 Access options: Returns file access information (refer to the
FFaoption
figure).
4 I16 (CM) Record size: Returns the logical record size associated with the file:
If the file was created as a binary file, this value is positive and is in halfwords.
If the file was created as an ASCII file, this value is negative and is in bytes.
For message files, when there is call to FCONTROL with
controlcode
=46, the value
returned is the size of the data records, including the 4 byte header.
Maintained for compatibility with MPE V/E-based systems only. CM record sizes
are imposed when FGETINFO returns record size information on all file types. If
the record size exceeds the limits, a zero is returned.
NOTE
If a zero is returned, use item 67.
5 I16 Device type/subtype: Returns the type and subtype of the device being used for a
KSAM, RIO, circular, or message file, or devices such as a tape drive, printer, or
terminal where bits (0:8) indicate the device subtype, and bits (8:8) indicate the
device type.
If the file is not spooled or is opened as a spoolfile through the logical device, the
actual value is returned. If an output file is spooled and was opened by device
class name, the type and subtype of the first device in its class is returned. (This
may be different from the device actually used.)
Table 9-2. FFILEINFO Itemnum/Item Values
Item
num
Item
Type
Item Description