fix: using fcopy instead of binary copy for file upload, for Viya 2026 compatibility
All checks were successful
Build / Build-and-ng-test (pull_request) Successful in 3m42s
Build / Build-and-test-development (pull_request) Successful in 9m33s
Lighthouse Checks / lighthouse (24.5.0) (pull_request) Successful in 18m44s

This commit is contained in:
2026-02-10 16:34:09 +00:00
parent f6b0f6b0cd
commit 716ee6eba0
2 changed files with 22 additions and 15 deletions

View File

@@ -3,12 +3,19 @@
@brief Creates demo tables and associated config
@details Can be removed in prod installs.
To activate this job, set dcdemoflag=1
To activate this job, add the following to SETTINGS:
%let demolib=PUBLIC;
libname &demolib "%sysfunc(pathname(&dc_libref))/&demolib";
%let joblib=HOOKLIB;
libname &joblib "%sysfunc(pathname(&dc_libref))/&joblib";
%let dcdemoflag=1;
Note that this will:
* REPLACE any tables named CARS_EXT or COUNTRIES in the PUBLIC library
* REPLACE all DC config for libraries named PUBLIC
* CREATE a folder called "demo" in the DC Apploc
* CREATE two BASE libraries (HOOKLIB & PUBLIC) in the DC (physical) folder
<h4> SAS Macros </h4>
@li mpeinit.sas
@@ -29,20 +36,10 @@
**/
%let dcdemoflag=1;
%let demolib=PUBLIC;
options dlcreatedir;
%mpeinit()
/* to enable - delete flag below and add libs to SETTINGS */
%let dcdemoflag=0;
libname &demolib "%sysfunc(pathname(&dc_libref))/&demolib";
%let joblib=HOOKLIB;
libname &joblib "%sysfunc(pathname(&dc_libref))/&joblib";
options dlcreatedir;
%global joblib demolib;
%mpeinit()
%mp_abort(iftrue= (&dcdemoflag ne 1)
,mac=&_program
@@ -322,7 +319,7 @@ filename ft15f001 temp;
parmcards4;
proc sql;
insert into XXXXXXXXXXX.JOBDATA values(
"&orig_libds (%mf_nobs(work.staging_ds) obs) staged %trim(
"&orig_libds staged %trim(
)by %mf_getUser() at %sysfunc(datetime(),datetime19.)","&pgmloc");
;;;;
filename f2 temp;

View File

@@ -286,7 +286,17 @@ options mprint;
)
filename outref "&dir/BKP_&xlsname";
data _null_;
if "&xlsref" ne "0" then do;
rc=fcopy("&xlsref","outref");
end;
run;
/**
* if running 9.3 or older, delete step above and enable macro below
%mp_binarycopy(iftrue=("&xlsref" ne "0"),inref=&xlsref,outref=outref)
*/
%mp_abort(iftrue= (&syscc ne 0)
,mac=&sysmacroname