The LINE_AFTER assignment statement
adds a line after a specified line in the current data set.
Syntax
Assignment statement syntax
.-DATALINE-.
>>-ISREDIT--LINE_AFTER--+-linenum-+-- = --+----------+--data---><
'-label---' +-INFOLINE-+
+-MSGLINE--+
'-NOTELINE-'
- linenum
- A
relative line number identifying the data line after which the new
line is to be inserted. A line pointer of 0 causes the new line to
be inserted at the beginning of the current data set.
- label
- A label identifying the data line after which the new line is
to be inserted.
- DATALINE
- The line inserted is a data line.
- INFOLINE
- The line inserted is a temporary, non-data line. The line command
field shows ====== in high intensity and the data
on the line is in high intensity, also. The line can be scrolled left
and right and can be as long as the current record length. An information
line is protected. Once it has been added to the data, it cannot be
referenced.
- MSGLINE
- The line inserted is a temporary, non-data line. The line command
field contains ==MSG> in high intensity and the
data on the line is also in high intensity. A message line has a data
length of 72 characters, regardless of the data width. Once it has
been added to the data, it cannot be referenced.
- NOTELINE
- The line inserted is a temporary, non-data line. The line command
field shows =NOTE= in high intensity and the data
on the line is in low intensity. A note line has a data length of
72 characters, regardless of the data width. It cannot be referenced
after it is added to the data.
- data
- Specifies that these data formats can be used:
- Simple string
- Delimited string
- Variable
- Template (< col,string >)
- Merge format (string1 + string2,
operand + string2, string1 +
operand)
- Operand:
- LINE
- Data from the line preceding this line.
- LINE linenum
- Data from the line with the given relative line number.
- LINE label
- Data from the line with the given label.
- MASKLINE
- Data from the mask line.
- TABSLINE
- Data from the tabs line.
Description
This statement is used for
adding lines with specific data. Use the INSERT command for data input.
Return codes
- 0
- Normal completion
- 4
- Data truncated
- 12
- Invalid line number
- 20
- Severe error
Examples
To add data after line 4 with
data from a variable named NEWDAT:
ISREDIT LINE_AFTER 4 = (NEWDAT)
Note: This
syntax is preferred to ISREDIT LINE_AFTER 4 = &NEWDAT because
the variable is not rescanned by either the language processor or
ISPF.
To put a new line that contains the string:
This is the new top line of the data
as
the first line of the data set:
ISREDIT LINE_AFTER 0 = "This is the new top line of the data"
To
put the contents of the line labeled
.START on a
new line following the line labeled
.END:
ISREDIT LINE_AFTER .END = LINE .START
To
put the contents of the mask line modified by the variable &DATA
after the line whose number is in variable &N:
ISREDIT LINE_AFTER &N = MASKLINE + &DATA