6%let rgf_tgt_ticket = ${globals.ticket};
9%let sas_risk_workgroup_dir = ${globals.sas_risk_workgroup_dir};
12%let cycle_id = ${context.cycle.key};
15%let analysis_run_id = ${context.analysisRun.key};
18%let analysis_data_key = ${params.ANALYSISDATA.key};
21%let adjustment_data_key = ${params.ADJUSTMENTDATA.key};
24%let schema_name = ${params.ANALYSISDATA.nav(
"analysisData_dataDefinition|RMC")[0].schemaName};
25%let schema_version = ${params.ANALYSISDATA.nav(
"analysisData_dataDefinition|RMC")[0].schemaVersion};
28%let ruleSet_key = ${params.RULESET.key};
31%let movement_type_cd = ${params.MOVEMENTTYPECD};
34%let movement_desc = ${params.MOVEMENTDESC};
37%let config_set_id = ${params.CONFIGSETID};
40%let log_level = ${params.LOGLEVEL};
43%let max_wait = ${params.MAXWAIT};
46%let lasr_load_method = ${params.LASRLOADMETHOD};
49%let reload_key_list = ${params.RELOADKEYLIST};
51%let reload_key_list = %sysfunc(prxchange(s/\W+/ /i, -1, %superq(reload_key_list)));
56%include
"&sas_risk_workgroup_dir./groups/Public/SASRiskManagementCore/cycles/&cycle_id./init.sas" / lrecl = 32000 source2;
59%irm_set_logging_options();
62libname cfg_lib
"&irm_fa_path./landing_area/base/%lowcase(&config_set_id.)/static";
63libname map_lib
"&irm_fa_path./landing_area/base/%lowcase(&config_set_id.)/mapping";
66%let reload_lasr_flg = %irmc_process_lasr_load_method(&lasr_load_method.);
69%let reportmart_group_id = Credit Risk;
71%
if (&movement_type_cd. eq IA_ADJ) %then %
do;
72 %let jobflow_status=Unknown;
74 %irmc_run_ia(credit_risk_data_key = &analysis_data_key.
75 , adjustment_data_key = &adjustment_data_key.
76 , run_id = &analysis_run_id.
77 , dr_libref = &dr_libref.
78 , dr_library_name = &dr_library_name.
79 , schema_name = &schema_name.
80 , schema_version = &schema_version.
81 , cycle_id = &cycle_id.
82 , entity_id = &entity_id.
83 , rgf_tgt_ticket = &rgf_tgt_ticket.
84 , rgf_protocol = &rgf_protocol.
85 , rgf_host = &rgf_host.
86 , rgf_port = &rgf_port.
87 , rgf_service = &rgf_service.
88 , rgf_solution = &rgf_solution.
89 , reportmart_group_id = &reportmart_group_id.
92 %irmc_load_reportmart(partition_no = 1
94 , ds_in_reportmart_config = reportmart_config
95 , ds_out_load_result = load_result
96 , irm_input_libraries =
97 , dr_libref = &dr_libref.
98 , dr_library_name = &dr_library_name.
99 , mart_libref = &mart_libref.
100 , rgf_protocol = &rgf_protocol.
101 , rgf_host = &rgf_host.
102 , rgf_port = &rgf_port.
103 , rgf_service = &rgf_service.
104 , rgf_solution = &rgf_solution.
105 , rgf_tgt_ticket = &rgf_tgt_ticket.
110 %let jobflow_category = Analytics;
111 %let jobflow_type = %lowcase(irm&solutionId._adjustment_allocation);
112 %let instance_date = %sysfunc(date(), yymmddp10.);
113 %let instance_time = %sysfunc(prxchange(s/(\d+):(\d+):(\d+)/$1h$2m$3s/i, -1, %sysfunc(time(), tod8.)));
114 %let instanceName = Adjustment Allocation &instance_date._&instance_time.;
115 %let instanceDesc = Adjustment Allocation;
118 data work.run_option;
123 config_name =
"RMC_FA_ID"; config_value =
"&rmc_fa_id."; output;
124 config_name =
"CYCLE_ID"; config_value =
"&cycle_id."; output;
125 config_name =
"ANALYSIS_RUN_ID"; config_value =
"&analysis_run_id."; output;
126 config_name =
"MAX_WAIT"; config_value =
"&max_wait."; output;
127 config_name =
"LOG_LEVEL"; config_value =
"&log_level."; output;
128 config_name =
"RELOAD_LASR_FLG"; config_value =
"&reload_lasr_flg."; output;
129 config_name =
"RELOAD_KEY_LIST"; config_value =
"&reload_key_list."; output;
133 data work.allocation_config;
138 config_name =
"ANALYSIS_DATA_KEY"; config_value =
"&analysis_data_key."; output;
139 config_name =
"ANALYSIS_DATA_DS_NAME"; config_value =
"&schema_name."; output;
140 config_name =
"RULESET_KEY"; config_value =
"&ruleSet_key."; output;
141 config_name =
"MOVEMENT_TYPE_CD"; config_value =
"&movement_type_cd."; output;
142 config_name =
"MOVEMENT_DESC"; config_value =
"&movement_desc."; output;
147 %let jobflow_status = Unknown;
149 %irm_rest_create_jobflow_instance(instance_name = &instanceName.
150 , description = &instanceDesc.
151 , entityId = &entity_id.
152 , entityRoleKey = &entity_role_key.
153 , category = &jobflow_category.
154 , jobflowFile = &jobflow_type.
155 , baseDate = &irm_base_dt.
156 , configSetId = &config_set_id.
157 , federatedAreaID = &irm_fa_id.
158 , sourceFederatedAreaId = &irm_fa_id.
159 , src_param_tables = work.run_option work.allocation_config
160 , tgt_param_tables = &solutionLibrefPrefix._CFG.RUN_OPTION &solutionLibrefPrefix._CFG.ALLOCATION_CONFIG
164 , maxWait = &max_wait.
165 , host = &irm_protocol.:
167 , tgt_ticket = &rgf_tgt_ticket.
168 , outvar = instanceKey
169 , outVarStatus = jobflow_status
173%
if(&movement_type_cd. = IA_ADJ or &jobflow_status. = Successful) %then %
do;
175 %irmc_refresh_lasr_schema_view(lasr_lib = &lasr_libref.
176 , mart_table_name = &schema_name.
177 , rls_table_name = &schema_name._rls
178 , meta_repository = &meta_repository.
179 , lasr_library_name = &lasr_library_name.
180 , lasr_meta_folder = &lasr_meta_folder.
185%irmc_update_ctrl_table(cycle_id = &cycle_id.
186 , analysis_run_id = &analysis_run_id.
187 , dr_libref = &dr_libref.
189 , entry_id = &instanceKey.
190 , entry_name = &instanceName.