User`s guide

lxii Contents
Search Field—Function 30
This function searches a field in the Host session presentation space for the specified string. You can
use Search Field for either protected or unprotected fields but only in a field-formatted host
presentation space.
Prerequisite Functions
Connect Presentation Space (function 1).
WinHLLAPI(SEARCHFIELD,lpbyString,lpwLength,lpwReturnnCode)
Parameter Description
Data String String to search for.
Data Length Length of the search string. NA if session option EOT
is specified.
PS Position Position in the Host session presentation space of the
field to search. If session options SRCHFROM and
SRCHFRWD are set, indicates position to search from.
If session options SRCHFROM and SRCHBKWD are
set, indicates position to search to. If session option
SRCHALL is set, can be the position of any byte in the
field to search.
Data Length Description
0 The search string was not found.
>0 The search string was found. Value is the Host session
presentation space position where the string begins.
Code Description
WHLLOK The search string was found.
WHLLNOTCONNECTED Your Windows HLLAPI application is not currently
connected to a Host session.
WHLLPARAMETERERROR Data String was length zero or greater than the Host
session presentation space size.
WHLLPOSITIONERROR PS Position is invalid.
WHLLSYSERROR The function failed due to a system error.
WHLLNOFIELD The search string was not found, or the Host session
presentation space is unformatted.
Function Call
Call Parameters
Return Parameters
Return Codes