51%macro mcf_length(wrap=NO
52 ,insert_cmplib=DEPRECATED
57%local i var cmpval found;
58%
if %mcf_init(mcf_length)=1 %then %
return;
60%
if &wrap=YES %then %
do;
61 proc fcmp outlib=&lib..&cat..&pkg;
64function mcf_length(var);
66 else if missing(var) or trunc(var,3)=var then len=3;
67 else if trunc(var,4)=var then len=4;
68 else if trunc(var,5)=var then len=5;
69 else if trunc(var,6)=var then len=6;
70 else if trunc(var,7)=var then len=7;
75%
if &wrap=YES %then %
do;
80%let cmpval=%sysfunc(getoption(cmplib));
82%
do i=1 %to %sysfunc(countw(&cmpval,%str( %(%))));
83 %let var=%scan(&cmpval,&i,%str( %(%)));
84 %
if &var=&lib..&cat %then %let found=1;
86%
if &found=0 %then %
do;
87 options insert=(CMPLIB=(&lib..&cat));