z/OS ISPF Edit and Edit Macros
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


LINE—Set or Query a Line from the Data Set

z/OS ISPF Edit and Edit Macros
SC19-3621-00

The LINE assignment statement either sets or retrieves the data from the data line specified by a relative line number or label, and places it in a variable.

Syntax

Read syntax diagramSkip visual syntax diagram
Assignment statement syntax

>>-ISREDIT--(varname)-- = --LINE--+-linenum-+------------------><
                                  '-label---'   

Read syntax diagramSkip visual syntax diagram
>>-ISREDIT--LINE--+-linenum-+-- = --data-----------------------><
                  '-label---'              

varname
Specifies the name of a variable to hold the contents of the specified data line.
linenum
A relative line number identifying the data line.
label
A label identifying the data line.
data
Specifies that these forms can be used:
  • Simple string
  • Delimited string
  • Variable
  • Template (< col,string >)
  • Merge format (string1 + string2, operand + string2, string1 + operand)
  • Operand:
    LINE
    Data from this line is used.
    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 logical data width of the line determines how many characters are retrieved or set. See the description of the DATA_WIDTH command for information on determining the current logical data width.

You must specify the line pointer to set or retrieve a line. To set data on a line, you can use a variety of data formats: (variable), templates, or merging a line with other data. The data on the line is completely overlaid with the data specified on this command.

Return codes

0
Normal completion
4
Data truncated (line shorter than data supplied)
8
Variable not found
12
Invalid line number
16
Variable data truncated
20
Severe error

Examples

To replace the data on line 7 with data from a variable named NEWDAT:
ISREDIT LINE 7 = (NEWDAT)
Note: This syntax is preferred to:
ISREDIT LINE 7 = &NEWDAT
because the variable is not rescanned by either the language processor or ISPF.
To set comment delimiters in columns 40 and 70, blanking the rest of the line:
ISREDIT LINE 1 = < 40 '&STR(/*)' 70 '&STR(*/)' >
To overlay the first 2 columns of line 2 with //:
ISREDIT LINE 2 = LINE + //
To merge mask line data with data from variable &VAR:
ISREDIT LINE 3 = MASKLINE + (VAR)

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014