%let pfa=D:\SASConfig\Lev1\AppData\SASIRM\pa\fas\fa.rgfadmin;
options dlcreatedir;
libname global "&pfa\input_area\base\global";
data global.configuration_set ;
attrib
VALID_FROM_DTTM length= 8 format=NLDATMS.
CONFIG_SET_ID length= $32
VALID_TO_DTTM length= 8 format=NLDATMS.
CONFIGURATION_SET_DESC length= $64
;
CONFIG_SET_ID ="hg_configuration";
CONFIGURATION_SET_DESC ="Heidelberg Training Configuration";
VALID_FROM_DTTM =1388534400;
VALID_TO_DTTM =32819299199;
;
run;
libname mapping "&pfa\input_area\base";
libname mapping "&pfa\input_area\base\hg_configuration";
libname mapping "&pfa\input_area\base\hg_configuration\mapping";
%let dttmfmt=NLDATM21.;
proc sql;
CREATE TABLE mapping.MAP_PROD_TYPE (
VALID_FROM_DTTM DATE FORMAT=&DTTMFMT INFORMAT=NLDATM21. label='Valid From Datetime',
PROD_TYPE_CD VARCHAR(3) label='Prod Type Code',
VALID_TO_DTTM DATE FORMAT=&DTTMFMT INFORMAT=NLDATM21. label='Valid To Datetime',
PROD_TYPE_DESC VARCHAR(100) label='Prod Type Description',
CONSTRAINT PRIM_KEY PRIMARY KEY (VALID_FROM_DTTM, PROD_TYPE_CD)
);
run;
%let low_date='01Jan04:00:00:00'dt;
%let high_date='31DEC2999:23:59:59'dt;
data mapping.MAP_PROD_TYPE ;
attrib
VALID_FROM_DTTM length= 8 format=NLDATMS.
PROD_TYPE_CD length= $6
VALID_TO_DTTM length= 8 format=NLDATMS.
TGT_PROD_TYPE length= $20
PROD_TYPE_DESC length= $100
;
retain VALID_FROM_DTTM &low_date;
retain VALID_TO_DTTM &high_date;
infile cards dsd delimiter=',';
input
PROD_TYPE_CD :$char.
TGT_PROD_TYPE :$char.
PROD_TYPE_DESC :$char.
;
datalines4;
"PROD_1","LOANS","Loans Without Facilities"
"PROD_2","DEPOSITS","Deposits "
;;;;
run;
/*STEP 3 - Touch last_update.txt to trigger live ETL and refresh the libnames */
data _null_;
FILE "&pfa\input_area\last_update.txt";
PUT;
run;