Previous Page | Next Page

Hash and Hash Iterator Object Language Elements

NEXT Method



Returns the next value in the underlying hash object.
Applies to: Hash iterator object

Syntax
Arguments
Details
See Also

Syntax

rc=object.NEXT( );


Arguments

rc

specifies whether the method succeeded or failed.

A return code of zero indicates success; a non-zero value indicates failure. If you do not supply a return code variable for the method call and the method fails, then an appropriate error message is written to the log.

object

specifies the name of the hash iterator object.


Details

Use the NEXT method iteratively to traverse the hash object and return the data items in key order.

The FIRST method returns the first data item in the hash object.

You can use the PREV method to return the previous data item in the hash object.

Note:   The NEXT method sets the data variable to the value of the data item so that it is available for use after the method call.  [cautionend]

Note:   If you call the NEXT method without calling the FIRST method, then the NEXT method will still start at the first item in the hash object.  [cautionend]


See Also

Methods:

FIRST Method

PREV Method

Operators:

_NEW_ Operator, Hash or Hash Iterator Object

Statements:

DECLARE Statement, Hash and Hash Iterator Objects

Using the Hash Iterator Object in SAS Language Reference: Concepts

Previous Page | Next Page | Top of Page