MainframeSupports
tip week 21/2005:

Many IBM mainframe products has a FIND command implemented. Normally FIND can be abbreviated down to the letter F. As you might know FIND is used to locate the occurence of a certain textstring in some kind of data, often a dataset. Most of the products supporting a FIND command also accepts an optional parameter called ALL.

When using ALL, FIND will locate all occurences of the supplied textstring in the data and position the cursor and the display on the first occurence in the data being processed. This behaviour is identical to the use of FIND without ALL except it may take considerable more time especially if the quantity of data being processed is big. The most important difference is however, that after processing the FIND ALL command the number of occurences is displayed in the upper right corner of the logical screen. If this is not true then press F1 (HELP). Now there may be some kind of message somewhere showing the number of occurences.

FIND ALL is handy when you are in the middle of the data being processed and you at this point want to know if a certain textstring exists in the data. If you use the ordinary FIND it might result in a "bottom of data reached" message and then you have to repeat your FIND command to be sure that the textstring can be found or not. Using FIND ALL the result is found right away. I will recommend the use of FIND FIRST for this kind of task, as FIND FIRST stops searching at the first occurence.

In ISPF EDIT/VIEW you are able to distinguish between excluded (FIND ALL X) and non-excluded (FIND ALL NX) data when using FIND ALL. And all the other options of FIND are of course also available when using ALL i.e. FIND in a certain column, FIND between labels and so on.

Previous tip in english        Sidste danske tip        Tip list