December 2001 Display and Operation 6 – 321
Module 9243 Reading from a file line by line
To read from a table, use Module 9245.
Open the file with Module 9240.
With Module 9243 read line-by-line from an ASCII file.
The “buffered” mode provides faster access times. The result is saved in a
string. The module reads up to the line break (LF), maximum 126 characters.
Call:
PS D <File handle>
Number from Module 9240
PS B/W/D/K <String number with result>
0 to 7
CM 9243
PL B/W/D <Number of read bytes>
>0: Line has been read
0: File end has been reached
–1: Error code in W1022
Error recognition:
Marker Value Meaning
W1022 2 Incorrect file handle
3 Incorrect string number
7 File system error
20 Module was not called in a spawn job or submit job