1608 HEIDENHAIN Technical Manual MANUALplus 620
Module 9242 Position in a file
With this module you change the position of the cursor in a file opened with
Module 9240. The new position is provided as result from Module 9242.
If the file was opened in the "record oriented" mode (tables), the cursor is
positioned line by line.
If the file was opened in the "buffered" mode, the cursor is positioned
character by character.
If you indicate a position before the beginning or after the end of the file, the
cursor is positioned to the beginning or end of the file, respectively. The
addressing of the new position is relative to the beginning or end of the file, or
to the current position. You can interrogate the current position by transferring
the position value zero relative to the current position.
Call only in a submit job or spawn job.
Call:
PS D <File handle>
Number from Module 9240
PS B/W/D/K <Desired position>
PS B/W/D/K <Mode>
0: Position relative to the file beginning
1: Position relative to the current position
2: Position relative to the file end
CM 9242
PL B/W/D/K <New position>
–1: Error code in NN_GenApiModuleErrorCode (W1022)
Error recognition:
Marker Value Meaning
NN_GenApiModule
ErrorCode (W1022)
1 Impermissible mode
2 Incorrect file handle
7 File system error
20 Module was not called in a spawn job or
submit job