fix: move cas session assign to settings.sas and abort when lib is unassigned
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
|
||||
<h4> SAS Macros </h4>
|
||||
@li mf_getengine.sas
|
||||
@li mp_abort.sas
|
||||
@li mv_castabload.sas
|
||||
|
||||
@author 4GL Apps Ltd
|
||||
@@ -20,11 +21,19 @@
|
||||
**/
|
||||
|
||||
%macro dc_casload(libds, mdebug=0);
|
||||
%if %mf_getengine(&libds)=CAS %then %do;
|
||||
%local eng;
|
||||
%let eng=%mf_getengine(&libds);
|
||||
%mp_abort(iftrue= (X&eng.X=XX)
|
||||
,mac=&_program
|
||||
,msg=%str(Library %scan(&libds,1,.) is not assigned)
|
||||
)
|
||||
|
||||
%if &eng=CAS %then %do;
|
||||
%mv_castabload(
|
||||
lib=%scan(&libds,1,.),
|
||||
table=%scan(&libds,2,.),
|
||||
mdebug=&mdebug
|
||||
)
|
||||
%end;
|
||||
|
||||
%mend dc_casload;
|
||||
|
||||
@@ -124,6 +124,9 @@ data _null_;
|
||||
put '/* This physical location is used for staging data and audit history */';
|
||||
put '%let dc_staging_area=' "&dcpath/dc_staging;";
|
||||
put ' ';
|
||||
put 'cas dcsession sessopts=(caslib=casuser);';
|
||||
put 'caslib _all_ assign;';
|
||||
put ' ';
|
||||
if &syssite in (70221618,70253615) then do;
|
||||
put "libname dcdemo '&dcpath/dc_demo';";
|
||||
end;
|
||||
|
||||
@@ -12,12 +12,6 @@
|
||||
|
||||
options noquotelenmax ps=max;
|
||||
|
||||
cas dcsession sessopts=(caslib=casuser);
|
||||
caslib _all_ assign;
|
||||
|
||||
libname casuser cas caslib=casuser;
|
||||
|
||||
|
||||
/*caslib casmusic path='/opt/sas/viya/cascache/tracks' libref=casmusic ;*/
|
||||
|
||||
%let syscc=0;
|
||||
|
||||
Reference in New Issue
Block a user