BookmarkSubscribeRSS Feed
mernamaher
Calcite | Level 5

If I have many variables, I am creating rules and decisions on it and these variables must be compared with a specified values example: I have nationality must be equal EG and salary must be equal 1000 and so on how to put these keys and values in one table and check against it in sas rule sets?

2 REPLIES 2
mkeintz
PROC Star

I have no idea whether a Viya-specific solution is available.  But if you run a SAS DATA step, you can use a hash object, with nationality and salary defined as the keys.

--------------------------
The hash OUTPUT method will overwrite a SAS data set, but not append. That can be costly. Consider voting for Add a HASH object method which would append a hash object to an existing SAS data set

Would enabling PROC SORT to simultaneously output multiple datasets be useful? Then vote for
Allow PROC SORT to output multiple datasets

--------------------------
Patrick
Opal | Level 21

@mkeintz The SAS data step with hash lookup also works in Viya for in CAS processing. CAS Table Lookup (Left Outer Join) on SAS Viya

As long as you don't modify the hash table once loaded (like using the add() method) there is no difference in outcome as compared to running under compute/SAS9.4