Arguments

Argument names specify field names of the record to be tested to determine if the record should be included in the list.

For each argument name specified, a corresponding argument value must be specified. The argument value you specify is compared with values in the actual database records to determine if the record should be included in the list. Argument values can be:
  • Character values. Any number of characters terminated by a blank or comparison operator. Character values can be specified generically, using asterisks and percent signs as masking characters. An asterisk (*) can be used in place of any number of characters or a null string. A percent sign (%) can be used in place of exactly one character.
    Note:
    1. Because the first blank or comparison-operator symbol ends the argument value, you cannot search for fields that contain imbedded blanks or comparison-operator symbols.
    2. Generic search arguments, * and %, cannot be used in the year part (YY) of date arguments.
  • Numeric values, which must occupy a fullword.

A comparison operator can follow the argument value, either with or without an intervening blank. The record is included in the list if:

=
The argument value is equal to the record value.
The argument value is not equal to the record value.
>
The argument value is greater than the record value.
>=
The argument value is greater than or equal to the record value.
<
The argument value is less than the record value.
<=
The argument value is less than or equal to the record value.

If no comparison operator is supplied, equals (=) is assumed.

Note:
  1. When you want to use a comparison operator (such as <, >, or ≠) in an argument, and the argument contains an IA value that includes a date and time, supply the full value as the argument value. The comparison operator can follow this value.
  2. To prevent unpredictable results when the system assigns an area that was just freed from a previous request, remember to do the following:
    1. GETMAIN an area size of one additional byte to the length of the specific argument's request.
    2. Insert a blank character at the end of the argument value.
    To clarify what unpredictable results could take place, consider the following sequence in a PIF request:
    1. GETMAIN 27 bytes (to store ADID, IA, and the > (greater than) operator
    2. LIST request
    3. FREEMAIN
    4. GETMAIN 26 bytes (to store ADID,IA)
    5. SELECT request
    As shown in this sequence, if the GETMAIN assigned to the SELECT request is the same as the one of the LIST request, the > operator is still present in the SELECT storage and this can originate unwanted results.
For example, if the current plan contains such occurrences as:
AAAAAA                 98/01/21 08.00  C
AAAAAA                 98/01/22 07.00  C
BBBBBB                 98/01/22 08.00  C
BBBBBB                 98/01/23 08.00  C
and you want to list all occurrences whose IA value is greater than the first IA value, you must supply '9801210800<' as the argument value. Alternatively, if you want to list all the occurrences whose application name is greater than the first application name, for example, you can supply a string of any number of characters terminated by a comparison operator, such as 'AAA<='. You can thus use the comparison operators in different ways, depending on the type of data you use as the argument.

The comparison operators do not work with the generic search arguments.