Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

7.88.1 LOC_ENTRY Parameters

IN_LIST

RET_ENTRY

RET_NUMBER

RET_STATUS

WHERE


Anchor
IN_LIST
IN_LIST
IN_LIST

Specifies the name of the list that should be searched by this command.

...

If a list name is used then the list name must be declared elsewhere in the RDML program by a DEF_LIST (define list) command and must have the TYPE(*WORKING) parameter.

Anchor
WHERE
WHERE
WHERE

Refer to Specifying Conditions and Expressions.

If no WHERE parameter is specified then the first entry in the list will always be returned by the LOC_ENTRY command.

Anchor
RET_NUMBER
RET_NUMBER
RET_NUMBER

Optionally specify the name of a field that is to be set by the LOC_ENTRY command to contain the entry number of the entry located.

...

By knowing a list entry number it is possible to directly retrieve an individual list entry (see the GET_ENTRY command for more details).

Anchor
RET_STATUS
RET_STATUS
RET_STATUS

Specifies the name of a field that is to receive the "return code" that results from the LOC_ENTRY command.

...

The LOC_ENTRY command only returns 2 possible status codes. These are "OK" (an entry was located) or "NR" (no entry was located).

Anchor
RET_ENTRY
RET_ENTRY
RET_ENTRY

Specifies whether or not the located list entry should be returned from the list into the RDML program.

...

*NO indicates that there is no need to return the list entry into the RDML program. This option is typically used when a list is being used for validation purposes. In such cases, it is the fact that the entry is in (or not in) the list that matters, not its location or content.

The command:

   LOC_ENTRY IN_LIST(#COUNTRIES) WHERE('#CNTRY = AUST')

is functionally identical to the commands:

   LOC_ENTRY IN_LIST(#COUNTRIES) WHERE('#CNTRY = AUST') RET_NUMBER(#NUMBER) RET_ENTRY(*NO)
IF_STATUS IS(*OKAY)
GET_ENTRY NUMBER(#NUMBER) FROM_LIST(#COUNTRIES)
ENDIF