Previous Topic: LOCIMOD()Next Topic: LU2()


LOCSTEM()

This function determines the values that are used for an index of a stem variable.

Syntax

index = LOCSTEM(stem.,[num])

Parameters

stem.

Name of the stem variable (including the period).

num

Number of a stem item.

index

Returns one of the following:

(if num is specified): Value of the index for the specified stem item.

(if num is omitted or zero): Count of stem elements.

(if an error occurs): Error text.

Indexes are returned in the same order as they were created.

Return Codes

101 - 102

ARG n MISSING OR INVALID

121

STEM VARIABLE NOT FOUND

122

STEM HAS NO MEMBERS

Example

limit = locstem('ABC.')             /* Obtain count of members */
do i = 1 to limit
   index = locstem('ABC.',i)        /* Obtain value for index  */
   say 'ABC.'||index 'Has value: ABC.index
   end i