Previous Topic: Represent Location of the Screen DataNext Topic: Locate the Current Cursor Position


Search the Current Field for a String

You can look for data from &LOC to the end of the field using the SEARCHF statement. For example, the following statement determines whether the current field (represented by the variable &SCRNFLD) contains the string "HELLO USER":

SEARCHF 'HELLO USER'

If the field contained the string "ENTER USERID" instead of "HELLO USER", this statement would return a condition code of NE.