XSTATUS—Set or Query Exclude Status of a Line
The XSTATUS assignment statement either sets the exclude status of the specified data line, or retrieves the exclude status of the specified data line and places it in a variable.
Syntax
- varname
- The name of a variable to contain the exclude status, either X or NX.
- linenum
- A relative line number identifying the line.
- label
- A label identifying the line.
- X
- Specifies that the specified line is to be excluded.
- NX
- Specifies that the specified line is to be shown (non-excluded).
Description
Exclude status determines whether the line is excluded.
If you want to exclude several lines at one time, the EXCLUDE command should be used. Similarly, to show several lines at one time, use the FIND command.
Return codes
- 0
- Normal completion
- 8
- An attempt to set a line status to NX could not be performed.
The line has a pending line command on it. For example, if an excluded
line contains an M line command in the line command field, then the
MOVE/COPY IS PENDINGmessage is displayed and the lines cannot be shown. The reset command can be used to remove your line commands from the line command field. - 12
- Line number is not an existing line.
- 20
- Severe error
Examples
Use XSTATUS together with SEEK
and CHANGE to preserve the exclude status of a line. For example,
to store the exclude status of the line whose number is in variable &N
in variable &LINEX:
ISREDIT (LINEX) = XSTATUS &NTo
exclude line 1:
ISREDIT XSTATUS 1 = XTo
locate a string and change it, saving and then restoring the exclude
status:
ISREDIT SEEK &DATA
IF &LASTCC = 0 THEN -
DO
ISREDIT (XLINE) = XSTATUS .ZCSR
ISREDIT CHANGE &DATA &NEWDATA .aZCSR .ZCSR
ISREDIT XSTATUS .ZCSR = (XLINE)
END