CORE
mf_getvarnum.sas File Reference

Returns the position of a variable in dataset (varnum attribute). More...

Go to the source code of this file.

Detailed Description

Returns the position of a variable in dataset (varnum attribute).

Uses varnum function to determine position.

Usage:

data work.test;
   format str $1.  num datetime19.;
   stop;
run;
%put %mf_getVarNum(work.test,str);
%put %mf_getVarNum(work.test,num);
%put %mf_getVarNum(work.test,renegade);

returns:

1

2

NOTE: Variable renegade does not exist in test

Parameters
libdsTwo part dataset (or view) reference.
varVariable name for which a position should be returned
Author
Allan Bowe
Version
9.2

Definition in file mf_getvarnum.sas.