@FreelanceReinh wrote: Ideally, the accepted solution should work not only for your current data, but also for similar data which later readers (or yourself or later users of your program) might apply it to. If the proposed methods were combined in one post, I would choose it, but useful information is split between many posts of the thread.. I can't judge about later users, but for me almost every post in this thread is useful 🙂 @FreelanceReinh wrote: No, only N and n are the same. _n_ (=_N_) is an automatic variable (see documentation) in every DATA step. It counts DATA step iterations (but can also be used for other purposes by programmers who know what they're doing) and is dropped automatically. It must not be confused with a variable _N, which a user may create like any other variable (such as X, n, testvar1, _foo, etc.). Understood, thank you.
... View more