| 
|  | » |  | 
 |  | |  |  |  | 
 The first parameter in every KSAM procedure call must be filetable, a table describing the file and 
 its access. This table is defined in the WORKING-STORAGE SECTION of the COBOL program. 
It requires eight words as illustrated in
Figure 3-1 Filetable Structure.
 
Figure 3-1 Filetable Structure ![[Filetable Structure]](img/f0301.gif)  filenumberA number identifying the file returned by the CKOPEN procedure 
after the file named in words 2-5 has been successfully opened. After 
the file is closed by CKCLOSE, filenumber is reset to 0. (This number 
should be set to zero when the file table is initially defined.) It must 
be defined as a COMPUTATIONAL item.filenameThe name of the KSAM file. This name is the actual designator 
assigned to the file when it is created with the KSAMUTIL BUILD 
command; filename may be a formal designator if it is equated to 
the actual designator in a :FILE command.input-output typeA code that limits the file access to input only, output only, or allows 
both input and output: It must be defined as a COMPUTATIONAL item.access modeA code that indicates how the file will be processed: sequentially only, 
randomly only, or either (dynamically): 2 = dynamic (sequential or random)
It must be defined as a COMPUTATIONAL item.
 |