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


EXCLUDE—Exclude Lines from the Display

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

The EXCLUDE macro command hides lines that contain a search string from view, and replaces them with a dashed line. To see the lines again, you enter either the RESET or RESET EXCLUDED command.

Syntax

Read syntax diagramSkip visual syntax diagram
                             .-.ZFIRST--.ZLAST-.  .-NEXT--.   
>>-ISREDIT--EXCLUDE--string--+-----------------+--+-------+----->
                             '-labela--labelb--'  +-ALL---+   
                                                  +-FIRST-+   
                                                  +-LAST--+   
                                                  '-PREV--'   

   .-CHARS--.                            
>--+--------+--+---------------------+-------------------------><
   +-PREFIX-+  +-start_col-----------+   
   +-SUFFIX-+  '-left_col--right_col-'   
   '-WORD---'                            

string
The search string you want to exclude. See Finding, seeking, changing, and excluding data.
Note: For edit macros written in CLIST, strings that contain an open comment delimiter (/*) must be placed within quotes within the &STR() such as &STR('/*XXX'). The maximum allowable length of the string is 256 bytes. If you are specifying a hex string, the maximum is 128 hexadecimal characters.
labela, labelb
Labels identifying the start and end of the group of lines within which the EXCLUDE command is to search.

If the cursor is currently placed above the start label and the PREV occurrence of a string is requested, or the cursor is currently placed below the end label and the NEXT occurrence of a string is requested, the process returns a return code of 4 and the string is not found, even if it exists within the label range.

For more information about using labels to identify a group of lines, see Labels and line ranges.

NEXT
Starts at the first position after the current cursor location and searches ahead to find the next occurrence of string.
ALL
Starts at the top of the data and searches ahead to find all occurrences of string.
FIRST
Starts at the top of the data and searches ahead to find the first occurrence of string.
LAST
Starts at the bottom of the data and searches backward to find the last occurrence of string.
PREV
Starts at the current cursor location and searches backward to find the previous occurrence of string.
CHARS
Locates string anywhere the characters match.
PREFIX
Locates string at the beginning of a word.
SUFFIX
Locates string at the end of a word.
WORD
Locates string when it is delimited on both sides by blanks or other non-alphanumeric characters.
start_col
The first column to be included in the range of columns to be searched. When you specify only one column, the editor finds the string only if the string starts in the specified column.
left_col
The first column to be included in the range of columns to be searched.
right_col
The last column to be included in the range of columns to be searched.
Note: For more information about restricting the search to only a portion of each line, see Limiting the search to specified columns.

Description

You can use the EXCLUDE command with the FIND and CHANGE commands to find a search string, change it, and then exclude the line that contains the string from the panel.

To exclude the next non-excluded line that contains the letters ELSE without specifying any other qualifications, include this command in an edit macro:
ISREDIT EXCLUDE ELSE
Since no other qualifications were specified, the letters ELSE can be:
  • Uppercase or a mixture of uppercase and lowercase
  • At the beginning of a word (prefix), the end of a word (suffix), or the entire word (word)
  • Anywhere within the current boundaries
To exclude the next line that contains the letters ELSE, but only if the letters are uppercase, include this command in an edit macro:
ISREDIT EXCLUDE C'ELSE'
This type of exclusion is called a character string exclusion (note the C that precedes the search string) because it excludes the next line that contains the letters ELSE only if the letters are found in uppercase. However, since no other qualifications were specified, the exclusion occurs no matter where the letters are found on a non-excluded line, as outlined in the previous list.

For more information, including other types of search strings, see Finding, seeking, changing, and excluding data.

Return codes

0
Normal completion
4
String not found
8
Lines not excluded
12
Inconsistent parameters
20
Severe error

Examples

This example excludes the first non-excluded line in the data set that contains the letters ELSE. However, the letters must occur on or between lines labeled .E and .S and they must be the first four letters of a word:
ISREDIT EXCLUDE ELSE .E .S FIRST PREFIX
This example excludes the last non-excluded line in the data set that contains the letters ELSE. However, the letters must occur on or between lines labeled .E and .S and they must be the last four letters of a word.
ISREDIT EXCLUDE ELSE .E
.S LAST SUFFIX
This example excludes the first non-excluded line that immediately precedes the cursor position and that contains the letters ELSE. However, the cursor must not be positioned ahead of the lines labeled .E and .S. Also, the letters must occur on or between the labeled lines; they must be standalone characters (not part of any other word); and they must exist within columns 1 and 5:
ISREDIT EXCLUDE ELSE .E .S PREV WORD 1 5

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014