Previous Topic: MOVE Statement

Next Topic: NOW Keyword

NEXT RECORD Statement

The NEXT RECORD statement ends processing on the current record and proceeds to the next record in the input file. The syntax is as follows:

NEXT RECORD.

Example

Enter these statements to make VMRGRW proceed to the next record if the date in the current record is earlier than February 1, 2010:

IF DATE LT '100201'.
    NEXT RECORD.
END IF.

The current record is not subject to any further processing.

NOW Keyword

The NOW keyword can be used with the COMPUTE and MOVE statements to affect a MOVE or COMPUTE step before processing SELECT or IGNORE statements. The parameters for the NOW COMPUTE and NOW MOVE statements are the same as those for the COMPUTE and MOVE statements. NOW COMPUTE and NOW MOVE statements are executed before any SELECT or IGNORE statements, while COMPUTE and MOVE statements are executed after any SELECT or IGNORE statements in the step.

NOW COMPUTE and NOW MOVE statements can be used to produce a computed value upon which SELECT and IGNORE statements act.

Example

For example, to compute the value of the WORK statement before the SELECT statement is executed, add a NOW COMPUTE statement similar to this one:

NOW COMPUTE WORK AS FLDA PLUS FLDB DISPLAY '99999' TYPE P/D HD.
SELECT IF WORK GT '100'.