A separate LINAGE-COUNTER special register is generated for each FD entry containing a LINAGE clause. When more than one is generated, you must qualify each reference to a LINAGE-COUNTER with its related file-name.
The implicit description of the LINAGE-COUNTER special register is one of the following:
The value in LINAGE-COUNTER at any given time is the line number at which the device is positioned within the current page. LINAGE-COUNTER can be referred to in Procedure Division statements; it must not be modified by them.
LINAGE-COUNTER is initialized to 1 when an OPEN statement for its associated file is executed.
LINAGE-COUNTER is automatically modified by any WRITE statement for this file. (See "WRITE Statement" in topic 6.2.40.)
If the file description entry for a sequential file contains the LINAGE clause and the EXTERNAL clause, the LINAGE-COUNTER data item is an external data item. If the file description entry for a sequential file contains the LINAGE clause and the GLOBAL clause, the LINAGE-COUNTER data item is a global data item.
You can specify the LINAGE-COUNTER special register wherever an integer argument to a function is allowed.
Adobe, the Adobe logo, Acrobat, the Acrobat logo, and Acrobat Reader are registered trademarks of Adobe Systems incorporated.