58%macro mx_append2pgm(loc
63%local platform name shortloc coderef combref work tmpfile viyaref;
64%let platform=%mf_getplatform();
66%
if &mdebug=1 %then %
do;
67 %put &sysmacroname entry vars:;
70%
if &syscc ne 0 %then %
do;
71 %put syscc=&syscc - &sysmacroname will not execute in
this state;
77 length name shortloc $500;
79 name=scan(loc,-1,
'/');
80 shortloc=substr(loc,1,length(loc)-length(name)-1);
81 call symputx(
'name',name,
'l');
82 call symputx(
'shortloc',shortloc,
'l');
86%let combref=%mf_getuniquefileref();
87%let work=%sysfunc(pathname(work));
88%let tmpfile=&combref..sas;
89filename &combref
"&work/&tmpfile" lrecl=32000;
91%
if &platform=SASVIYA %then %
do;
93 %let viyaref=%mf_getuniquefileref();
94 filename &viyaref filesrvc folderpath=
"&shortloc";
96 file &combref lrecl=32000 termstr=crlf;
97 infile &viyaref(
"&name..sas") lrecl=32000 end=last;
101 filename &viyaref clear;
102 %symdel _FILESRVC_&viyaref._URI;
106 %let coderef=%mf_getuniquefileref();
107 %mx_getcode(&loc, outref=&coderef)
109 file &combref lrecl=32000 termstr=crlf;
110 infile &coderef lrecl=32000 end=last;
114 filename &coderef clear;
119 file &combref lrecl=32000 termstr=crlf mod;
120 infile &inref lrecl=32000;
126%if &platform=SASJS %then %do;
127 %ms_deletefile(&loc..sas)
128 %ms_createfile(&loc..sas, inref=&combref, mdebug=&mdebug)
130%else %if &platform=SASVIYA %then %do;
131 %mv_deletefoldermember(path=&shortloc, name=&name..sas, contenttype=file)
132 %mv_createfile(path=&shortloc, name=&name..sas, inref=&combref)
136 %mm_deletestp(target=&loc)
137 %mm_createstp(stpname=&name
147filename &combref clear;