HAS_PREV Method
Determines whether there is a previous item in the current key's multiple data item list.
| Applies to: | Hash package |
|---|
Table of Contents
Syntax
Required Argument
package
specifies an instance of the hash package variable.
Details
If a key has multiple data items, you can use the HAS_PREV method to determine whether there is a previous item in the current key's multiple data item list. If there is a previous item, the method returns a zero. Otherwise, it returns a nonzero value.
The FIND method determines whether the key exists in the hash package. The HAS_NEXT method determines whether multiple data items are associated with the key. When you have determined that the key has a previous data item, that data item can be retrieved by using the FIND_PREV method. The FIND_PREV method sets the data variable to the value of the data item so that it is available for use after the method call. Once you are in the data item list, you can use the HAS_PREV and FIND_PREV methods in addition to the HAS_NEXT and FIND_NEXT methods to traverse the list.
Example
See Also
-
Non-Unique Key and Data Pairs in SAS DS2 Programmer’s Guide
-
Methods: