diff --git a/base/mf_getplatform.sas b/base/mf_getplatform.sas index 02d368e..4d20dbd 100644 --- a/base/mf_getplatform.sas +++ b/base/mf_getplatform.sas @@ -22,6 +22,12 @@ )/*/STORE SOURCE*/; %local a b c; %if &switch.NONE=NONE %then %do; + %if %symexist(sasjsprocessmode) %then %do; + %if &sasjsprocessmode=Stored Program %then %do; + SASJS + %return; + %end; + %end; %if %symexist(sysprocessmode) %then %do; %if "&sysprocessmode"="SAS Object Server" or "&sysprocessmode"= "SAS Compute Server" %then %do; diff --git a/base/mp_streamfile.sas b/base/mp_streamfile.sas index 9d3a65c..2cbfab3 100644 --- a/base/mp_streamfile.sas +++ b/base/mp_streamfile.sas @@ -55,7 +55,7 @@ data _null_; run; %if &contentype=CSV %then %do; - %if &platform=SASMETA and &streamweb=1 %then %do; + %if (&platform=SASMETA and &streamweb=1) or &platform=SASJS %then %do; data _null_; rc=stpsrv_header('Content-type','application/csv'); rc=stpsrv_header('Content-disposition',"attachment; filename=&outname"); @@ -69,7 +69,7 @@ run; %end; %else %if &contentype=EXCEL %then %do; /* suitable for XLS format */ - %if &platform=SASMETA and &streamweb=1 %then %do; + %if (&platform=SASMETA and &streamweb=1) or &platform=SASJS %then %do; data _null_; rc=stpsrv_header('Content-type','application/vnd.ms-excel'); rc=stpsrv_header('Content-disposition',"attachment; filename=&outname"); @@ -82,7 +82,7 @@ run; %end; %end; %else %if &contentype=GIF or &contentype=JPEG or &contentype=PNG %then %do; - %if &platform=SASMETA and &streamweb=1 %then %do; + %if (&platform=SASMETA and &streamweb=1) or &platform=SASJS %then %do; data _null_; rc=stpsrv_header('Content-type',"image/%lowcase(&contenttype)"); run; @@ -99,7 +99,7 @@ run; %end; %end; %else %if &contentype=TEXT %then %do; - %if &platform=SASMETA and &streamweb=1 %then %do; + %if (&platform=SASMETA and &streamweb=1) or &platform=SASJS %then %do; data _null_; rc=stpsrv_header('Content-type','application/text'); rc=stpsrv_header('Content-disposition',"attachment; filename=&outname"); @@ -112,7 +112,7 @@ run; %end; %end; %else %if &contentype=WOFF or &contentype=WOFF2 or &contentype=TTF %then %do; - %if &platform=SASMETA and &streamweb=1 %then %do; + %if (&platform=SASMETA and &streamweb=1) or &platform=SASJS %then %do; data _null_; rc=stpsrv_header('Content-type',"font/%lowcase(&contenttype)"); run; @@ -123,7 +123,7 @@ run; %end; %end; %else %if &contentype=XLSX %then %do; - %if &platform=SASMETA and &streamweb=1 %then %do; + %if (&platform=SASMETA and &streamweb=1) or &platform=SASJS %then %do; data _null_; rc=stpsrv_header('Content-type', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); @@ -138,7 +138,7 @@ run; %end; %end; %else %if &contentype=ZIP %then %do; - %if &platform=SASMETA and &streamweb=1 %then %do; + %if (&platform=SASMETA and &streamweb=1) or &platform=SASJS %then %do; data _null_; rc=stpsrv_header('Content-type','application/zip'); rc=stpsrv_header('Content-disposition',"attachment; filename=&outname");