SAS Documentation
SASĀ® Solution for Stress Testing
Reference manual - version 08.2021
Loading...
Searching...
No Matches
irmst_script_financial_statement_projection.sas
1/*****************************************************************/
2/* Perform FS Projection Calculations */
3/*****************************************************************/
4
5/* Get the model parameters */
6%let input_data_rwa_key = ${params.RWADATA.key};
7%let bsRetainRREAccnt = ${params.RESERVESANDRETAINEDEARN};
8%let bsRetainYPFAccnt = ${params.NETINCOME};
9%let ofRWAAccnt = ${params.OWNFUNDSRWAACCOUNT};
10%let data_map_gl = ${params.DATAMAPGL.key};
11%let data_map_pl = ${params.DATAMAPPL.key};
12%let data_map_of = ${params.DATAMAPOF.key};
13
14
15/* Include the model code */
16%include "&fa_path./source/sas/nodes/irmst_model_fs_projection.sas";
17
18/* Get current date (yyy-mm-dd) and time (HH:MM:ss) */
19%let current_dt_ymd = %sysfunc(date(), yymmddd10.);
20%let current_tm_tod = %sysfunc(time(), tod10.);
21
22/* Pull additional parameters from the datastore_config table */
23data _null_;
24 set ST_CFG.datastore_config (where = (datastore_group_id = "Financial Statement"));
25 /* Compile regular expression to remove string @!*(generatedpassworddomain)*! when relying on IRM_USER_ID macro variable */
26 rx = prxparse("s/@!\*\‍(generatedpassworddomain\‍)\*!//i");
27 /* Store the parameters into macro variables */
28 call symputx("bep_result_schema_name", SCHEMA_NAME, "L");
29 call symputx("bep_result_schema_version", resolve(SCHEMA_VERSION), "L");
30 call symputx("bep_result_analysis_data_name", prxchange(rx, -1, resolve(ANALYSIS_DATA_NAME)), "L");
31 call symputx("bep_result_analysis_data_desc", prxchange(rx, -1, resolve(ANALYSIS_DATA_DESC)), "L");
32 call symputx("bep_result_data_def_name", prxchange(rx, -1, resolve(DATA_DEFINITION_NAME)), "L");
33 call symputx("bep_result_data_def_desc", prxchange(rx, -1, resolve(DATA_DEFINITION_DESC)), "L");
34 call symputx("bep_result_business_category", BUSINESS_CATEGORY, "L");
35 call symputx("bep_result_data_category", DATA_CATEGORY, "L");
36 call symputx("bep_result_reportmart_group", REPORTMART_GROUP_ID, "L");
37 call symputx("bep_result_risk_type", RISK_TYPE, "L");
38 call symputx("bep_result_data_type", DATA_TYPE, "L");
39 call symputx("bep_result_partition_vars", PARTITION_VARS, "L");
40 call symputx("bep_result_filterable_vars", FILTERABLE_VARS, "L");
41 call symputx("bep_result_attributable_vars", ATTRIBUTABLE_VARS, "L");
42 call symputx("bep_result_primary_key", PRIMARY_KEY, "L");
43 call symputx("bep_result_index_list", INDEX_LIST, "L");
44 call symputx("bep_result_constraint_flg", CONSTRAINT_ENABLED_FLG, "L");
45run;
46
47/* Process date directives for name/description parameters pulled from datastore_config*/
48%let bep_result_analysis_data_name = %irm_process_date_directive(name = %superq(bep_result_analysis_data_name));
49%let bep_result_analysis_data_desc = %irm_process_date_directive(name = %superq(bep_result_analysis_data_desc));
50%let bep_result_data_def_name = %irm_process_date_directive(name = %superq(bep_result_data_def_name));
51%let bep_result_data_def_desc = %irm_process_date_directive(name = %superq(bep_result_data_def_desc));
52
53/* Run the FS Projection model */
54%fs_projection(input_data_rwa_key = &input_data_rwa_key.
55 , bsRetainRREAccnt = &bsRetainRREAccnt.
56 , bsRetainYPFAccnt = &bsRetainYPFAccnt.
57 , ofRWAAccnt = &ofRWAAccnt.
58 , data_map_gl = &data_map_gl.
59 , data_map_pl = &data_map_pl.
60 , data_map_of = &data_map_of.
61 );
62
63/* Get Reportmart data structure */
64%let libref = work;
65proc sql;
66 %include "&fa_path./source/sas/misc/ddl/reportmart/fs_projection.sas" / source2 lrecl = 32000;
67quit;
68
69/* Write the FS Projection model results to the output table, keeping the variables defined in the ddl file */
70data &ds_out_bep_expectations.;
71 attrib
72 %irm_get_attrib_def(ds_in = fs_projection)
73 ;
74 keep %rsk_getvarlist(fs_projection);
75 set ds_out_bep_expectations;
76run;