feat: auto-save CAS tables #224
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
<h4> SAS Macros </h4>
|
||||
@li bitemporal_dataloader.sas
|
||||
@li dc_assignlib.sas
|
||||
@li dc_cassave.sas
|
||||
@li mf_existds.sas
|
||||
@li mf_existvar.sas
|
||||
@li mf_getattrn.sas
|
||||
@@ -669,6 +670,9 @@ run;
|
||||
ctl_ds=&mpelib..mpe_lockanytable
|
||||
)
|
||||
|
||||
/* save table to disk (if viya + cas) */
|
||||
%dc_cassave(&libds)
|
||||
|
||||
/* run post-approve hook */
|
||||
%mpe_runhook(POST_APPROVE_HOOK)
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
@file
|
||||
@brief Saves an in-memory CAS table back to persistent storage
|
||||
@details There are three versions of this macro, one per build
|
||||
target. The interface is the same. This version is META and
|
||||
is a no-op as CAS is not available on this platform.
|
||||
|
||||
@param [in] libds library.dataset of the CAS table to save
|
||||
@param [in] mdebug= (0) Set to 1 to enable verbose logging
|
||||
|
||||
@author 4GL Apps Ltd
|
||||
@copyright 4GL Apps Ltd. This code may only be used within Data
|
||||
Controller and may not be re-distributed or re-sold without the
|
||||
express permission of 4GL Apps Ltd.
|
||||
**/
|
||||
|
||||
%macro dc_cassave(libds, mdebug=0);
|
||||
%mend dc_cassave;
|
||||
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
@file
|
||||
@brief Saves an in-memory CAS table back to persistent storage
|
||||
@details There are three versions of this macro, one per build
|
||||
target. The interface is the same. This version is SERVER and
|
||||
is a no-op as CAS is not available on this platform.
|
||||
|
||||
@param [in] libds library.dataset of the CAS table to save
|
||||
@param [in] mdebug= (0) Set to 1 to enable verbose logging
|
||||
|
||||
@author 4GL Apps Ltd
|
||||
@copyright 4GL Apps Ltd. This code may only be used within Data
|
||||
Controller and may not be re-distributed or re-sold without the
|
||||
express permission of 4GL Apps Ltd.
|
||||
**/
|
||||
|
||||
%macro dc_cassave(libds, mdebug=0);
|
||||
%mend dc_cassave;
|
||||
@@ -0,0 +1,30 @@
|
||||
/**
|
||||
@file
|
||||
@brief Saves an in-memory CAS table back to persistent storage
|
||||
@details There are three versions of this macro, one per build
|
||||
target. The interface is the same. This version is VIYA and
|
||||
delegates to mv_castabsave to save the named table back to its
|
||||
original source file.
|
||||
|
||||
@param [in] libds library.dataset of the CAS table to save
|
||||
@param [in] mdebug= (0) Set to 1 to enable verbose logging
|
||||
|
||||
<h4> SAS Macros </h4>
|
||||
@li mf_getengine.sas
|
||||
@li mv_castabsave.sas
|
||||
|
||||
@author 4GL Apps Ltd
|
||||
@copyright 4GL Apps Ltd. This code may only be used within Data
|
||||
Controller and may not be re-distributed or re-sold without the
|
||||
express permission of 4GL Apps Ltd.
|
||||
**/
|
||||
|
||||
%macro dc_cassave(libds, mdebug=0);
|
||||
%if %mf_getengine(&libds)=CAS %then %do;
|
||||
%mv_castabsave(
|
||||
lib=%scan(&libds,1,.),
|
||||
table=%scan(&libds,2,.),
|
||||
mdebug=&mdebug
|
||||
)
|
||||
%end;
|
||||
%mend dc_cassave;
|
||||
Reference in New Issue
Block a user