The MONOTONIC function is an undocumented SAS function. It needs no input parameters and if any input parameters are provided, these are ingnored. The function counts the number of times it is called and returns an ascending sequence of integers, starting at 1. The function can be used in an expressions and is syntatically valid in both a DATA Step and an SQL procedure. However, it may produce unexpected results in some circumstances. http://www.sascommunity.org/wiki/MONOTONIC_function#Alternatives_to_the_MONOTONIC_function https://communities.sas.com/t5/SAS-Communities-Library/MONOTONIC-function-in-PROC-SQL/ta-p/475752
... View more