Installation Note 60164: Using the DS2 random variate function in SAS® Event Stream Processing 4.x fails and returns the "Unknown function RAN*" message
SAS Event Stream Processing is able to process DS2 code in either DS2 Window Handler mode or SAS® Micro Analytic Service modules. However, when using SAS Event Stream Processing 4.x, you might find that the DS2 random number variate functions are not recognized and the Unknown function RAN* error occurs.
For example, using the RANUNI function in either a DS2 Window Handler or SAS Micro Analytic Service module in SAS Event Stream Processing 4.x results in the following error message:
2017-03-22T15:16:00,313; INFO ; 00000033; DF.ESP; (dfESPmas.cpp:471); Module 'test_module' message 1 of 1: Unknown function RANUNI.
Beginning in SAS Event Stream Processing 4.x, RAN* functions are no longer supported. The RAND(*) suite of functions is now the recommended alternative for any RAN* function. For more details about RAND functions, see the "RAND Function" section of SAS® 9.4 DS2 Language Reference, Sixth Edition.
Note: The RAN* functions still function normally in SAS Event Stream Processing 3.x.
The following RAN* functions are not recognized by SAS Event Stream Processing 4.x: RANBIN, RANCAU, RANEXP, RANGAM, RANNOR, RANPOI, RANTBL, RANTRI, and UNIFORM.
Note: The UNIFORM function is an alias function for RANUNI.
This table maps the RAN* functions to the updated RAND(*) functions:
| RAN* Function |
RAND(*) Function |
| RANBIN() |
RAND('BINOMIAL',p,n) |
| RANCAU() |
RAND('CAUCHY') |
| RANEXP() |
RAND('EXPONENTIAL') |
| RANGAM() |
RAND('GAMMA',a) |
| RANNOR() |
RAND('NORMAL') |
| RANPOI() |
RAND('POISSON',m) |
| RANTBL() |
RAND('TABLE',p1,p2,...) |
| RANTRI() |
RAND('TRIANGLE',h) |
| RANUNI() |
RAND('UNIFORM') |
| UNIFORM() |
RAND('UNIFORM') |
Note: If you want to create reproducible streams of pseudo-random numbers, then specify STREAMINIT before any calls to the RAND pseudo-random number function. See the SAS® 9.4 DS2 Language Reference, Sixth Edition for more details about the STREAMINIT function.
Operating System and Release Information
| SAS System | SAS Event Stream Processing Engine | Linux for x64 | 4.1 | | | |
| Microsoft® Windows® for x64 | 4.1 | | | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Some DS2 random number variate functions are not recognized in SAS® Event Stream Processing 4.x in both DS2 Window Handler Mode and SAS® Micro Analytic Service modules.
| Type: | Installation Note |
| Priority: | medium |
| Date Modified: | 2017-04-03 10:00:41 |
| Date Created: | 2017-03-21 14:10:20 |