The
LINE_BEFORE assignment statement adds a line before a specified line
in the current data set.
Syntax
Assignment statement syntax
.-DATALINE-.
>>-ISREDIT--LINE_BEFORE--+-linenum-+-- = --+----------+--data--><
'-label---' +-INFOLINE-+
+-MSGLINE--+
'-NOTELINE-'
- linenum
- A
relative line number identifying the data line before which the new
line is to be inserted. A line pointer of 0 is invalid.
- label
- A label identifying the data line before 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. The data on
the line is shown 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. The data
on the line is shown in high intensity also. 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. The data on
the line is shown in low intensity. A note line has a data length
of 72 characters, regardless of the data width. It cannot be referenced
once it has been 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 (those allowed follow):
- LINE
- Data from the line following 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
The LINE_BEFORE statement is
used for adding lines with specific data. Use INSERT for data input.
Return codes
- 0
- Normal completion
- 4
- Data truncated
- 12
- Invalid line number
- 20
- Severe error
Examples
To add data before line 4 with
data from a variable named NEWDAT:
ISREDIT LINE_BEFORE 4 = (NEWDAT)
Note: This
syntax is preferred to ISREDIT LINE_BEFORE 4 = &NEWDAT because
the variable is not rescanned by either the language processor or
ISPF.
To put the contents of the line labeled
.START on
a new line preceding the line labeled
.END:
ISREDIT LINE_BEFORE .END = LINE .START
To
put the contents of the mask line modified by the variable &DATA
before the line whose number is in variable &N:
ISREDIT LINE_BEFORE &N = MASKLINE + &DATA