56%macro mx_createfile(filepath
61%local platform name shortloc;
62%let platform=%mf_getplatform();
64%
if &inref=0 %then %
do;
65 %put %str(ERR)OR: &sysmacroname requires a valid inref fileref;
69%
if &platform=SASJS %then %
do;
70 %ms_createfile(%superq(filepath), inref=&inref, mdebug=&mdebug)
72%
else %
if &platform=SASVIYA %then %
do;
75 filepath=symget(
'filepath');
76 name=scan(filepath,-1,
'/');
77 shortloc=substr(filepath,1,length(filepath)-length(name)-1);
78 call symputx(
'name',name,
'l');
79 call symputx(
'shortloc',shortloc,
'l');
81 %mv_createfile(path=%superq(shortloc)
87%
else %
if &platform=SAS9 or &platform=SASMETA %then %
do;
93 filepath=symget(
'filepath');
94 name=scan(filepath,-1,
'/');
95 shortloc=substr(filepath,1,length(filepath)-length(name)-1);
96 call symputx(
'name',name,
'l');
97 call symputx(
'shortloc',shortloc,
'l');
100 %let fref=%mf_getuniquefileref();
101 filename &fref
"%sysfunc(getoption(work))/%superq(name).sas";
103 infile &inref lrecl=32767;
104 file &fref lrecl=32767;
108 %mm_createstp(stpname=%superq(name)
109 ,tree=%superq(shortloc)
110 ,filename=%superq(name).sas
111 ,directory=%sysfunc(getoption(work))
115 %
if &mdebug=0 %then %
do;
118 %let rc=%sysfunc(fdelete(&fref));
119 filename &fref clear;
123 %put %str(ERR)OR: &sysmacroname: &platform is unsupported!!!;