I'm very new to the SAS World, but i have a little experience on t-sql. What i want to do is create a table or a data set with with an unique ID with an auto increment like t-sql do or a sequence like Oracle but with SAS.
I've heard of a surrogate key. Can i create un surrogate key to do this functionality ?
The full text of the note says:
The MONOTONIC() function is not supported in PROC SQL. Using the
MONOTONIC() function in PROC SQL can cause missing or non-sequential
values to be returned.
To me, this means that if you do use the MONOTONIC function, then you can't complain when/if it doesn't return sequential numbers.. I suspect that for simple, simple queries, you might be OK, but for more complex queries that involve joins and where clauses, you might get into the missing or non-sequential values.
I heard a logical explanation for concern about use of "monotonic()".
When an sql platform/optimiser/engine has enough information to multi-thread resolution of a query," monotonic()" may be implemented in parallel across threads. The result would not be what is desired.
For simple platforms and queries, that can be expected to single-thread, monotonic() should be able provide the unique id.
This scenario, where a feature cannot be expected to "universally" work, applies in other parts of SAS. For example the number of observations indicated by the NOBS= option on a SET statement, will be missing (or may even be negative) when the data set is a view or subject to a where clause.