Open topic with navigation
WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
xcall L_FINDSPEC(list_id, [string], [column], [length], [direction], [case], [type], [current], & [wrap][, find_source])
The ID of the list to search. (n)
(optional) The string for which to search. (a)
(optional) The first column to search. (n)
(optional) The length of the search area (a maximum of 256 characters). (n)
(optional) The direction of the search: (n)
(optional) The case‑sensitivity flag: (n)
Case sensitive. (default)
(optional) The flag that indicates what type of search will occur: (n)
Search for a literal string. (default)
Search for a wild card match.
Search for equality.
Search for inequality.
Search for a string greater than.
Search for a string less than.
Search for a string greater than or equal to.
Search for a string less than or equal to.
(optional) The flag that indicates whether the current item is checked as part of the search: (n)
Do not test current item. (default)
Test current item.
(optional) The wrap‑around find flag: (n)
Search to end of list and then wrap around to start at beginning of list until search string is found or original item is re‑encountered.
Search only from the original item to the end of the list. (default)
(optional) If passed and non‑zero, the flag that indicates whether the non‑window data or the associated input window (display data) will be searched: (n)
Search non‑window data. (default)
Search display data.
L_FINDSPEC specifies the parameters for subsequent find operations performed by a D_LFIND request in the L_PROCESS subroutine. This subroutine does not perform a search; it merely sets the parameters for subsequent find operations that will occur. If L_FINDSPEC is called more than once, the parameters that it sets are combined. If any of these parameters contradict one another, the parameter that is set last overrides the others.
For example, if you make the following calls to L_FINDSPEC:
xcall l_findspec(trans_lst, find_string,,,D_LFND_RVRS,,D_LFND_NE,,, & D_LFND_DATA) xcall l_findspec(trans_lst, find_string,,,,D_LFND_NOCASE,D_LFND_EQ,,,
the following search parameters are defined: reverse direction, case insensitivity, search for equality, search display data.
If string is not passed, the previous find string is used. If none exists, a blank string is used.
If find_source is D_LFND_DATA,
The length argument is limited to the number of characters from column to the end of the non‑window data. So, for example, if length is passed as 17 and there are 15 characters from column to the end of the non‑window data, only 15 characters are used.
If find_source is D_LFND_DISPLAY,
The length argument is limited to the number of characters from column to the last column and row of the input window. So, for example, if length is passed as 17 and there are 15 characters from column to the last column and row of the input window, only 15 characters are used.
If find_source is not passed or is zero, the previously specified value for find_source is used. If there is no previous value for find_source, the value is assumed to be D_LFND_DATA if a data argument was passed to L_CREATE or D_LFND_DISPLAY if no data argument was passed to L_CREATE.
If direction is not passed, the previous direction value will be used. If no previous direction exists, the search will go forward.
You can pass the %I_FLDSTRPOS, %I_FLDSIZE, and/or %I_FLDDIM field information functions in place of passing column and length. An example of these functions used with the L_FINDSPEC subroutine is in the %I_FLDSTRPOS Examples.
If case is not passed, the previous case value will be used. If no previous case value exists, the search will be case sensitive.
If type is not passed, the previous find type is used. If no previous find type exists, D_LFIND searches for a literal string (D_LFND_CONTAIN). The following rules apply to the type flags:
If current is not passed, the previous testing value will be used. If no previous value exists, D_LFIND won’t test the current item. The following rules apply to the current flags:
The following example defines search parameters for the list identified by order_lst. If this is the first and only call to L_FINDSPEC, the L_PROCESS subroutine will search the list for a case‑sensitive match for find_string (a literal string). The search will start with the item that follows the current one and search forward through the list. The entire data area passed to L_PROCESS will be searched. If needed, L_PROCESS will call the load method for this list to retrieve additional items.
xcall l_findspec(order_lst, find_string,,,,,,,D_LFIND_DATA) req = D_LFIND xcall l_process(order_lst, req, order_rec)