Developer Guide and Reference

ID 767251
Date 10/31/2024
Public
Document Table of Contents

Position Specifier (POS=)

The position specifier identifies the file position in file storage units in a stream file (ACCESS='STREAM'). It takes the following form:

POS=p

p

Is a scalar integer expression that specifies the file position. It can only be specified for a file opened for stream access. If omitted, the stream I/O occurs starting at the next file position after the current file position.

Each file storage unit has a unique file position, represented by a positive integer. The first file storage unit is a file is at file position 1. The position of each subsequent file storage unit is one greater than that of its preceding file storage unit.

For a formatted file, the file storage unit is an eight-bit byte. For an unformatted file, the file storage unit is an eight-bit byte (if option assume byterecl is specified) or a 32-bit word (if option assume nobyterecl, the default, is specified).

A POS= specifier must not be specified for a child I/O statement.