Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
SET MFWR-INDX TO 1.
SEARCH MFWR-WHSE-COUNTRY-TBL
At End
Perform No-Match-Found
When (WHSE-WHS = MFWR-CNTRY-WHS (MFWR-INDX))
AND (WHSE-BAY = MFWR-CNTRY-BAY (MFWR-INDX))
AND (WHSE-ROW = MFWR-CNTRY-ROW (MFWR-INDX))
NEXT SENTENCE
This is plain wrong. One cannot assume that an invalid index value "points" to anything.At any rate, you are pointing to the area of memory immediately following your table.
While one can't assume the index points to anything, it is clearly greater than the occurrence number and can be tested for such a value to determine if the SEARCH failed to satisfy its terminating condition:If the end of the table is reached (that is, the incremented index-name value is greater than the highest possible occurrence number) without the WHEN condition being satisfied, the search is terminated, as described in the next paragraph.
If, when the search begins, the value of the index-name associated with identifier-1 is greater than the highest possible occurrence number, the search immediately ends, and, if specified, the AT END imperative-statement is executed. If the AT END phrase is omitted, control passes to the next statement after the SEARCH statement.
IF MFWR-INDX > MFWR-WHSE-COUNTRY-TBL-SIZE
... search failed ...