FindRow Method (DATATABLE)


10.5, PLBCMP GUI Only

 

The FindRow method finds a row from a beginning position in a DATATABLE. Optional search criteria may be used in the find process. The method uses the following format:

 

[label]

{object}.FindRow

[GIVING {return}] USING [*Start=]{start}][:

 

 

[*Text=]{text}][:

 

 

[*Param=]{param}][:

 

 

[*Col=]{column}][:

 

 

[*Flags=]{flags}]

 

Where:

label

Optional. A Program Execution Label.

object

Required. A DATATABLE object.

return

Optional. A Numeric Variable that returns the zero-based index when the row is found or -1 if the text is not found.

start

Optional. A decimal number or Numeric Variable that specifies the zero-based row number from which to start the search. The search starts with the row following this row number.

text

Optional. A Character String Variable or literal indicating the string to locate.

param

Optional. A decimal number or Numeric Variable that specifies the user-defined value to locate.

column

Optional. A decimal number or Numeric Variable that specifies a zero-based value of a column to be searched.

flags

Optional. A decimal number or Numeric Variable that alters the search method as described below.

Flags Affected: EOS, OVER, ZERO

Note the following:

  1. The EOS flag is always cleared.

  2. The ZERO flag is set if the {return} value is zero.

  3. The OVER flag is set if the {return} variable is too small to receive the return value.

  4. If a {start} is not specified, the default value is -1.

  5. If a {column} is not specified, the default value is -1.

  6. The {flags} bit mask values are defined as follows:

  7.  

    Value

    Meaning

    0x8

    Allow partial match for the find process. The partial match is a free float match from left to right. Also, the float match is not case sensitive.

    0x10

    Search only checked rows.

 

 

See Also: Method Syntax, DATATABLE Methods

 



PL/B Language Reference FindNextRow Method (DATATABLE) GetColumnCount Method (DATATABLE)