fix: using fcopy instead of binary copy for file upload, for Viya 2026 compatibility
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user