z/OS ISPF User's Guide Vol II
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


SRCHFOR command

z/OS ISPF User's Guide Vol II
SC19-3628-00

Use the SRCHFOR primary command to search the data sets in the data set list for one or more strings of data using the SuperC Utility (see Option 3.14). You may limit the search to excluded or non-excluded data sets, and control whether migrated data sets are recalled and searched or not. Use this format:
SRCHFOR string

The string parameter is optional but always converted to uppercase. If specified it is used to prefill the first search string on the subsequent DSLIST Srchfor Options panel.

WORD, SUFFIX, and PREFIX are available operands for search string specification. Note that the search strings are case sensitive and must match exactly as specified. Consider the 'Any case' process option if you want to disregard case.

Select the "ASCII" process option to cause ISPF to process the data in the data sets as ASCII. The data read from the data sets is converted from ASCII to EBCDIC. Any search string given in hexadecimal notation is assumed to be in ASCII, matching the original input data. The ASCII code page is assumed to be ISO 8859-1 (CCSID 819). The terminal code page is used as the EBCDIC code page. If the terminal code page cannot be determined code page 1047 is used.

You can use the C (continuation) operand to specify that both the current and previous string must be found on the same line to constitute a match. Otherwise, lines with either string are treated as matching.

Table 1. SRCHFOR command search string examples
Example Search strings Explanation
===> ABC
===> EFG
Either string ABC or EFG may be found in the search data set.
===> ABC WORD
===> EFG C
The two strings (ABC and EFG) must be found on the same line. ABC must be a complete word, while EFG (a continuation definition) can be part of any word.
===> ABcD prefix The string (ABcD) is detected if the case of each letter matches and it is a prefix of a word.
===> X'7b00' The hex string is specified as the search string. The listing must be browsed with 'HEX ON'.
===> 'AB C''D' The string (AB C'D) is specified.

To start the search, press the Enter key from the DSLIST Srchfor Options panel. To cancel the request and return to the Data Set List, enter END or CANCEL.

Output is in the listing DSN you specify and in the MESSAGE field in the DSLIST. Sort on this field to consolidate results.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014