READROW Function

Reads the next row of data from the step above and fills the variables that represent the incoming step's data with the new values. It returns false if there are no more rows to read.

Category: Data Input
Returned data type: Integer
Note: The returned value is a Boolean value representing whether there are values in the incoming step's data, true = there are still rows in parent node; false = no more rows to read.

Syntax

READROW(< >)

Details

The READROW function is a Data Job-only function.
Note: The READROW function has no effect when called from a pre- or post-expression. When called from a pre-group or post-group expression, it can cause undesirable results.

Example

Assume that this step is below a step with a name field and the step outputs four rows, "John", "Paul", "George", and "Igor":
// Declare a string to contain the "old" or "previous" value
string oldname
 
// Set the value of OLDNAME to whatever is in NAME
oldname=name
     // Name has the value "John', oldname also contains "John"
 
// Use the READROW function to read in the next record
readrow()
     // OLDNAME is still "John", but NAME is now "Paul"