49%macro mcf_length(wrap=YES
54%local i var cmpval found;
55%
if %mcf_init(mcf_length)=1 %then %
return;
57%
if &wrap=YES %then %
do;
58 proc fcmp outlib=&lib..&cat..&pkg;
61function mcf_length(var);
63 else if missing(var) or trunc(var,3)=var then len=3;
64 else if trunc(var,4)=var then len=4;
65 else if trunc(var,5)=var then len=5;
66 else if trunc(var,6)=var then len=6;
67 else if trunc(var,7)=var then len=7;
72%
if &wrap=YES %then %
do;
77%let cmpval=%sysfunc(getoption(cmplib));
79%
do i=1 %to %sysfunc(countw(&cmpval,%str( %(%))));
80 %let var=%scan(&cmpval,&i,%str( %(%)));
81 %
if &var=&lib..&cat %then %let found=1;
83%
if &found=0 %then %
do;
84 options insert=(CMPLIB=(&lib..&cat));