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

33
3 Obtaining File Information
You can obtain file information about an existing file using the LISTFILE command or the
FGETINFO and FGETKEYINFO intrinsics. You can also add specific information about your
file by writing it to a user label. The FWRITELABEL and FREADLABEL intrinsics provide
access to user labels.
Displaying File and Key Information
Use the LISTFILE command to display the file specifications used to build the file. This
command lists descriptions of one or more disk files at the level of detail you select. The
level of display detail is controlled by the option number or keyword parameter
followingthe file name.
A KSAM XL file does not have a unique file code. The file's structure can be discerned from
a LISTFILE display using option 1 (SUMMARY)or2(DISC). When displayed in this manner,
the character K is appended to the file type of a KSAM XL or a KSAM64 file to distinguish
them from standard files. A file code of KSAM identifies a CM KSAM data file. A file code
of KSAMK identifies a CM KSAM key file. The following example displays summary
information for a KSAM XL file, a CM KSAM key file, a CM KSAM data file, a KSAM64
file, and a standard file.
Figure 3-1. File Type Display
:LISTFILE,1
ACCOUNT= AR GROUP= MGR
FILENAME CODE ------------LOGICAL RECORD-------
SIZE TYP EOF LIMIT
ARMSTRXL 160B FAK 0 115
EMPKEY KSAMK 128W FB 1742 1742
EMPLOYEE KSAM 256B FA 0 1023
ARMSTR64 160B FAK 0 115
CLIENT 80B FA 1 1
Two options display the key specifications for a KSAM file. Option 5 (DATA) displays the file
specifications and key data for the file. Option 7 (UNIQUE) displays information that is
unique to the file type. For KSAM files, this displays the key data without the file
specifications.
Figure 3-2. provides an example of the LISTFILE command using option 5 (DATA) and the
display it generates.