FILEIO


 

The FILEIO instruction provides a method of using a single instruction to perform different instructions against the same logical file. Not all I/O instructions or access methods are supported by FILEIO. The instruction uses the following format:

 

 

[label]

FILEIO

{file},{access},{method};{list}[;]

 

Where:

label

Optional. A Program Execution Label.

file

Required. A previously defined and opened FILE or IFILE definition that is accessed.

access

Required. A previously defined Character String Variable defining an ISAM key or a Numeric Variable or Expression defining the access method for the instruction.

method

Required. A previously defined Numeric Variable or Expression defining the instruction that is performed.

list

Required. Any combination of previously defined Character String Variable, Numeric Variable, string or numeric Literals, string or numeric ARRAYs, or individual array elements, VARLISTs of string or numeric variables, valid {ctrl} characters, or valid disk I/O List Controls that is processed.

;

Optional. A semicolon indicating Partial I/O.

Flags Affected: LESS, OVER

Note the following:

  1. {method} designates which type of instruction is performed. The supported instructions utilize the following values:

  2.  

    Value

    Method

    1

    READ

    2

    WRITE

    3

    WRITAB

    4

    READKS

    5

    READKP

    6

    UPDATE

     

  3. The type of variable and contents required for {access} is dependent upon the file type (FILE or IFILE) in use, the access method being utilized and the instruction being performed. In ISAM file I/O, {access} would a character string (containing the ISAM key information) for WRITE instructions and character string (containing the ISAM key) or numeric (determining sequential or random access) for READ instructions. If a READKS, READKP or UPDATE type of instruction is being performed, {access} is ignored since key/record identifier is not required for these instructions.

  4. Whether {list} is required depends upon the type of instruction performed, in read type instructions it may not be desired whereas write type instructions obviously need it.

  5. Any List Controls in {list} that are invalid for the instruction type specified are ignored (i.e., tabbing or *UC for WRITE, *ZF for READ, etc.).

  6. All rules concerning the instruction and file type in use apply, including partial I/O (terminating {list} with a semicolon).

  7. FILEIO is not compatible with AAM file (AFILE) definitions.

 

 

See Also: Example Code, Disk I/O Instructions

 



PL/B Language Reference ERASE FILEPI