The Position built-in extract file method positions the offset of the external file attached to the extract file. It is used in conjunction with the Determine Actual and ForEach logic commands when reading an extract file in ispec or report logic.
Syntax
<<extract file>>::Position(RecordNumber : numericExpression) : void
Owner
Any extract file.
Parameters
RecordNumber
If the RecordNumber parameter is set to a specific value, the extract file is read from the record after that specified number. If the parameter is not set to a number, the read starts from the first record. That is, using zero positions the file at the start of the file i.e. at the first record. Using 1 sets the file to the next record after the first, that is, the second record, and so on. Hence,
AExtract.Position(5)
means that the next record read will be the sixth record.
If the parameter is set to a value equal to or greater than the last record number in the file, the Glb.Status built-in segment attribute is set to "*****" after the Determine Actual logic command is executed.