@DonH ... Thanks and fair enough ... but how do we qualify the variables that have no "intended usage" to begin with? For example, at times I use first._n_ and last._n_ as utility variables since the are perfectly fine numeric variables set to 0 at compile and auto-dropped from the output. Actually, first./last. can be attached in this manner to _error_, _iorc_ and any other variable. Even if it's not in the PDV - and even if it is a non-scalar variable in the PDV! Watch this:
data _null_ ;
dcl hash h ;
dcl hiter i ;
put first.h= last.h= first.i= last.i= first.var= last.var= ;
run ;
A curious thing is that though PUT shows all of them =0, you get the "unitialized" messages, too 😀. Looks as though the compiler sees no association of first.X / last.X with X at all unless X is part of BY - in which case, by the way, it sets them to 1. Proof:
data _null_ ;
put first.name= last.name= ;
stop ;
set sashelp.class ;
by name ;
run ;
Kind regards
Paul D.
... View more