BPX4LSK (lseek) example
The following code changes the file (FILEDESC) offset
to 80 bytes past the current offset. For the callable service,
see lseek (BPX1LSK, BPX4LSK) — Change a file's offset. For
the data structure, see BPXYSEEK — Constants for lseek. AMODE 31 callers
use BPX1LSK (lseek) example.
MVC FILEDESC,.. File descriptor from open
MVC OFFSET(08),=FL8'80' Forward 80 Bytes
MVC REFPT,=A(SEEK_CUR) Current offset of the file
SPACE ,
CALL BPX4LSK, Change a file's offset +
(FILEDESC, File descriptor +
OFFSET, I/O: Offset in file +
REFPT, Input: Reference point, BPXYSEEK +
RETVAL, Return value: 0 or -1 +
RETCODE, Return code +
RSNCODE), Reason code +
MF=(E,PLIST) ----------------------------------