
6.MACRO EXECUTOR FUNCTION B-63943EN-2/01
- 246 -
Setting a file pointer
Function This command sets a file pointer.
Format FPSET (file-number, pointer-type, pointer)
Explanation The <file-number> parameter specifies the file for which a
pointer is to be set up. See Table 6.13.6 (a) for the values
that can be used as file numbers.
The <pointer-type> parameter specifies the type of the
pointer to be set up. See Table 6.13.6 (d) for the type
values.
The <pointer> specifies a desired pointer according to the
specified type.
The result of executing this command is returned to the
macro variable number specified in FOPEN. The user must
check this value. See Table 6.13.6 (e) for the status values.
Caution If pointer type 0 is specified, the <pointer> parameter is
nullified.
If pointer type 2 is specified, the positive and negative
values of the <pointer> parameter correspond to the
backward and forward directions from the current pointer,
respectively.
Sample
statement
FPSET (200,2,12)
This statement advances the current pointer of file No. 200
by 12. The result of executing this statement is returned to
the status variable number specified when the file was
opened.
6.13.6 Caution
CAUTION
1 To read data from a file, specify the same conditions
as used when the data was written. (Satisfy the
following conditions.)
• The file pointer for reading points to the same
location as for writing.
• The data type for reading is the same as for
writing.
If the above conditions are not satisfied, the read
data may differ from the write data.
2 If the data type is binary form 1 or 2, writing <null>
data results in 0 being written.
Table 6.13.6 (a) File numbers
Value Description
200 to
999999999
File
Table 6.13.6 (b) Access mode values
Value Description
0 Read mode
1 Read and write mode