LINE_STATUS—Query Source and Change Information for a Line in a Data Set
The LINE_STATUS assignment statement retrieves the source and change information for the data line specified by a line pointer, and places it in a variable. This information indicates how the line was originally added to the data, and how it has been changed during the edit session.
- The name of a variable to contain the status string for the specified
line. This is a 32-character variable containing character 1s and
Characters 1-7 are "source" information.
- Character 1
- Line is an original record (it existed when the edit session started)
- Character 2
- Line was created by the Move line command
- Character 3
- Line was created by the Copy or Repeat line command
- Character 4
- Line was created by the MOVE primary or macro command
- Character 5
- Line was created by the COPY primary or macro command
- Character 6
- Line was created by the TE line command
- Character 7
- Line was created by the Insert line command
Characters 8-14 are "change" information.
- Character 8
- Line was changed (one of these characters will also be set to show HOW the line was changed)
- Character 9
- Data on the line was typed over
- Character 10
- Data was changed by the CHANGE primary command or the Overlay line command
- Character 11
- Data was changed by the Column Shift line command [ used the (, ((, ), or )) command]
- Character 12
- Data was changed by the Data Shift line command [ used the <, <<, >, or >> command]
- Character 13
- Data was changed by the TE, TF, or TS line command
- Character 14
- The line was renumbered
Characters 15-32 are reserved for future use.
- A relative line number identifying the data line.
- A label identifying the data line.
- Normal completion
- Line number not valid
- Severe error
To determine if line number one of your data has changed and to display a message informing you of its status:
ISREDIT (LINESTAT) = LINE_STATUS 1 If linestat(1) = '1' Then Say 'Line is an ORIGINAL record' Else Say 'Line was created during this edit session' If linestat(8) = '1' Then Say 'Line has been changed' Else Say 'Line has not been changed'