Find Key for OnDemand (FNDKEYOND)

The Find Key for OnDemand (FNDKEYOND) command allows you to search for a particular document that is available through the folder specified in the FOLDER parameter. The OnDemand client is launched to view the results of the search. The key fields entered must exist in the folder. This command is intended as an API to launch the OnDemand client from a "green screen" application.

Parameters

Keyword Description Choices Notes
FOLDER Folder Character value Required, Positional 1
LGLREL Logical relation *AND, *OR Optional, Positional 2
KEYFLD Search argument Values (up to 10 repetitions): Element list Optional, Positional 3
Element 1: Key field Character value
Element 2: Operator *EQ, *NE, *LT, *LE, *GT, *GE, *BETWEEN, *NOTBETWEEN, *IN, *NOTIN, *LIKE, *NOTLIKE
Element 3: Value 1 Character value
Element 4: Value 2 Character value

Folder (FOLDER)

Specify the name of the folder to search.

If the value to be entered contains lower case letters, blanks, or special characters, it must be enclosed in apostrophes.

This is a required parameter.

Note: Position the cursor in the folder parameter entry and use the prompt (F4) key to view the list of folder values that are available for the default (*DFT) instance.

The default instance is specified in the QDFTINST data area. The QDFTINST data area can exist in multiple libraries. A search for the QDFTINST data area is performed using the library list. The first data area found will be used. If the QDFTINST data area is not found using the library list, the QUSRRDARS library will be searched for the data area. If the data area exists in the QUSRRDARS library it will be used. If the QDFTINST data area is not found, instance QUSROND is used.

Logical relation (LGLREL)

Specify the logical relationship between the different key fields.

*AND
Multiple keys are to be ANDed.
*OR
Multiple keys are to be ORed.

Search argument (KEYFLD)

Specifies one or more key fields, operators, and values to search for.

Note: You can enter multiple values for this parameter. If you are on an entry display and you need additional entry fields to enter these multiple values, type a plus sign (+) in the entry field opposite the phrase "+ for more" and press the Enter key.

Key field

Specify the key field name this search is for. A valid key field must be specified.

If the value to be entered contains lower case letters, blanks, or special characters, it must be enclosed in apostrophes.

Element 1: Operator

*EQ
EQUAL search using the data in Value 1.
*NE
NOT EQUAL search using the data in Value 1.
*LT
LESS THAN search using the data in Value 1.
*LE
LESS THAN OR EQUAL search using the data in Value 1.
*GT
GREATER THAN search using the data in Value 1.
*GE
GREATER THAN OR EQUAL search using the data in Value 1.
*BETWEEN
BETWEEN search using the data in Value 1 and Value 2.
*NOTBETWEEN
NOT BETWEEN search using the data in Value 1 and Value 2.
*IN
IN search using the data in Value 1.
*NOTIN
NOT IN search using the data in Value 1.
*LIKE
LIKE search using the data in Value 1.
*NOTLIKE
NOT LIKE search using the data in Value 1.

Element 2: Value 1

Specify the data value to search for.

If the value to be entered contains lower case letters, blanks, or special characters, it must be enclosed in apostrophes.

Element 3: Value 2

Specify the data value that is the ending value for a between or not between search.

If the value to be entered contains lower case letters, blanks, or special characters, it must be enclosed in apostrophes.

Examples

Example 1: Simple Example

FNDKEYOND FOLDER(CHECKSTMTS)
            KEYFLD(('Account Number' *EQ '251000022')

This command allows you to search for a particular OnDemand Common Server document that is available through the CHECKSTMTS folder. If the OnDemand Client launch environment is set up on your workstation and you are logged on to the client "listener" program, then the OnDemand Client displays the results of the search. The key field name that you enter (Account Number) must be defined in the OnDemand Common Server folder definition.

Example 2: More Complex Example

FNDKEYOND FOLDER(CHECKSTMTS)
            KEYFLD(('Account Number' *EQ '251000022')
            ('Document Date' *BETWEEN '06/16/88' '08/16/02'))

This command is similar to Example 1 but shows the use of more than one key field/value and the *BETWEEN operator. Multiple key fields and values can be specified, and a variety of operators are available with this command.

Error messages

*ESCAPE Messages

RDR2882
Client Launch API program QRLRLCV ended with error code &1.