49%macro mcf_string2file(wrap=YES
54%local i var cmpval found;
55%
if %mcf_init(mcf_string2file)=1 %then %
return;
57%
if &wrap=YES %then %
do;
58 proc fcmp outlib=&lib..&cat..&pkg;
61function mcf_string2file(filepath $,
string $, mode $);
62 if mode=
'APPEND' then fmode=
'a';
65 rc=filename(fref,filepath);
66 if (rc ne 0) then
return( -1 );
67 fid = fopen(fref,fmode);
68 if (fid = 0) then
return( -1 );
77%
if &wrap=YES %then %
do;
82%let cmpval=%sysfunc(getoption(cmplib));
84%
do i=1 %to %sysfunc(countw(&cmpval,%str( %(%))));
85 %let var=%scan(&cmpval,&i,%str( %(%)));
86 %
if &var=&lib..&cat %then %let found=1;
88%
if &found=0 %then %
do;
89 options insert=(CMPLIB=(&lib..&cat));