6%let rgf_protocol = ${globals.protocol};
7%let rgf_host = ${globals.host};
8%let rgf_port = ${globals.port};
9%let rgf_service = ${globals.service};
10%let rgf_solution = ${globals.contentId};
11%let rmc_fa_id = ${context.cycle.rmcVersionNm};
14%let sas_risk_workgroup_dir = ${globals.sas_risk_workgroup_dir};
17%let rgf_tgt_ticket = ${globals.ticket};
20%let cycle_id = ${context.cycle.key};
23%let cycle_name = %nrbquote(${context.cycle.name});
26%let analysis_run_id = ${context.analysisRun.key};
29%let entity_id = ${context.cycle.entityId};
32%let irm_fa_id = ${context.cycle.versionNm};
35%let base_dt = ${context.cycle.baseDt};
38%let log_level = ${params.LOGLEVEL};
46%let perspectiveId = ${context.cycle.solutionCreatedIn};
48%let solutionShortName = Stress Testing;
49%let solutionName = SAS Solution
for Stress Testing;
50%let solutionLibrefPrefix = ST;
55%let irm_fa_path = %sysfunc(metadata_appprop(IRM Mid-Tier Server, com.sas.solutions.risk.irm.fa.&irm_fa_id.));
56%let rmc_fa_path = %sysfunc(metadata_appprop(IRM Mid-Tier Server, com.sas.solutions.risk.irm.fa.&rmc_fa_id.));
61 "&irm_fa_path./source/sas/ucmacros"
62 "&rmc_fa_path./source/sas/ucmacros"
67%irm_set_logging_options();
70%let irm_base_dt = %sysfunc(inputn(&base_dt., yymmdd10.), mmddyyn8.);
73%let cycle_dir = &sas_risk_workgroup_dir./groups/Public/SASRiskManagementCore/cycles/&cycle_id.;
76%rsk_mkdirs_and_verify(&cycle_dir.);
79%let dr_libref = %upcase(&solutionId.)DR;
81%let dr_library_name = SAS &solutionShortName. Data Repository;
83libname &dr_libref. meta liburi = "SASLibrary?@Name='&dr_library_name.'" metaout = data;
86%let mart_libref = %upcase(&solutionLibrefPrefix.)MART;
88%let mart_library_name = SAS &solutionShortName. Reportmart;
91%let rmc_libref = RGFRMC;
93%let rmc_library_name = SAS Risk Management Core Database;
96%irmc_update_ctrl_table(cycle_id = &cycle_id., dr_libref = &dr_libref.);
99%let existing_lua = %sysfunc(prxchange(s/[()]
101filename LUAPATH ("&irm_fa_path./source/lua" "&rmc_fa_path./source/lua" &existing_lua.);
104%irm_get_service_info(SWCName = IRM Mid-Tier Server
105 , DeployedComponentName = Registered SAS Application
112 call symputx("irm_protocol", protocol, "G");
113 call symputx("irm_host", host, "G");
114 call symputx("irm_port", port, "G");
118%irm_get_service_info(SWCName = Visual Analytics Transport Service
119 , DeployedComponentName = Registered SAS Application
127 call symputx("va_protocol", protocol, "G");
128 call symputx("va_host", host, "G");
129 call symputx("va_port", port, "G");
133%irm_get_service_info(SWCName = Risk Financ Wkbnch Mid-Tier
134 , DeployedComponentName = Registered SAS Application
141 call symputx("rfw_protocol", protocol, "G");
142 call symputx("rfw_host", host, "G");
143 call symputx("rfw_port", port, "G");
147%irm_get_service_info(SWCName = Model Imp Pltfrm Mid-Tier
148 , DeployedComponentName = Registered SAS Application
155 call symputx("mip_protocol", protocol, "G");
156 call symputx("mip_host", host, "G");
157 call symputx("mip_port", port, "G");
158 call symputx("mip_service", ksubstr(service, 2), "L");
162%irm_get_service_info(SWCName = Risk Scenario Manager
163 , DeployedComponentName = Registered SAS Application
170 call symputx("rsm_protocol", protocol, "L");
171 call symputx("rsm_host", host, "L");
172 call symputx("rsm_port", port, "L");
173 call symputx("rsm_service", ksubstr(service, 2), "L");
177%irm_get_java_classpath(path = &irm_fa_path./source/java/lib/pdfUtils.jar
183%irm_rest_get_entities(host = &irm_protocol.:
185 , tgt_ticket = &rgf_tgt_ticket.
190%let entity_role_key =;
192 set entities (where = (
id = "&entity_id." and baseDate = "&irm_base_dt."));
193 call symputx("entity_role_key", role_type, "G");
196%if %sysevalf(%superq(entity_role_key) =,
boolean) %then %do;
197 %irm_terminate(msg = Could not retrieve entity role for entity &entity_id. and baseDate &irm_base_dt.);
200%let content_version =;
204 property_value $1000.
206 infile "&irm_fa_path./../version.txt" dlm = ":=";
211 if property_name = "Version" then
212 call symputx("content_version", property_value, "G");
216%let lasr_libname_stmt =;
217%irm_get_libdebug(libname_stmt = libname rmclasr meta liburi = "SASLibrary?@Name='SAS &solutionShortName. LASR'" metaout = data
218 , outvar = lasr_libname_stmt
222%let lasr_libref = %scan(%superq(lasr_libname_stmt), 2, %str( ));
228 file "&cycle_dir./init.sas" lrecl = 32000 termstr = nl;
242 put '%let content_version = ' "&content_version.;";
245 put '%let perspectiveId = ' "&perspectiveId.;";
248 put '%let solutionId = ' "&solutionId.;";
251 put '%let solutionLibrefPrefix = ' "&solutionLibrefPrefix.;";
254 put '%let solutionShortName = ' "&solutionShortName.;";
257 put '%let solutionName = ' "&solutionName.;";
260 put '%let cycle_dir = ' "&cycle_dir.;";
263 put '%let irm_fa_id = ' "&irm_fa_id.;";
266 put '%let rmc_fa_id = ' "&rmc_fa_id.;";
269 put '%let meta_repository = Foundation;';
272 put '%let dr_libref = ' "&dr_libref.;";
275 put '%let dr_library_name = ' "&dr_library_name.;";
278 put '%let mart_libref = ' "&mart_libref.;";
281 put '%let mart_library_name = ' "&mart_library_name.;";
284 put '%let lasr_libref = ' "&lasr_libref.;";
287 put '%let lasr_library_name = ' "SAS &solutionShortName. LASR;";
290 put '%let lasr_meta_folder = ' "/Products/&solutionName./Data/Visual Analytics;";
293 put '%let irm_fa_path = ' "&irm_fa_path.;";
296 put '%let rmc_fa_path = ' "&rmc_fa_path.;";
299 put '%let entity_id = ' "&entity_id.;";
302 put '%let entity_role_key = ' "&entity_role_key.;";
305 put '%let base_dt = ' "&base_dt.;";
308 put '%let irm_base_dt = ' "&irm_base_dt.;";
311 put '%let sas_risk_workgroup_dir = ' "&sas_risk_workgroup_dir.;";
314 put '%let rgf_protocol = ' "&rgf_protocol.;";
315 put '%let rgf_host = ' "&rgf_host.;";
316 put '%let rgf_port = ' "&rgf_port.;";
317 put '%let rgf_service = ' "&rgf_service.;";
318 put '%let rgf_solution = ' "&rgf_solution.;";
321 put '%let irm_protocol = ' "&irm_protocol.;";
322 put '%let irm_host = ' "&irm_host.;";
323 put '%let irm_port = ' "&irm_port.;";
326 put '%let mip_protocol = ' "&mip_protocol.;";
327 put '%let mip_host = ' "&mip_host.;";
328 put '%let mip_port = ' "&mip_port.;";
329 put '%let mip_service = ' "&mip_service.;";
332 put '%let rsm_protocol = ' "&rsm_protocol.;";
333 put '%let rsm_host = ' "&rsm_host.;";
334 put '%let rsm_port = ' "&rsm_port.;";
335 put '%let rsm_service = ' "&rsm_service.;";
338 put '%let va_protocol = ' "&va_protocol.;";
339 put '%let va_host = ' "&va_host.;";
340 put '%let va_port = ' "&va_port.;";
344 put ' insert = (sasautos = (';
345 put " ""&irm_fa_path./source/sas/ucmacros""";
346 put " ""&rmc_fa_path./source/sas/ucmacros""";
349 put " set = CLASSPATH ""&classpath.""";
352 put 'options ibufsize = 32760;';
355 put 'options compress = binary;';
358 put 'options dbidirectexec;';
361 put "filename LUAPATH (""&irm_fa_path./source/lua""";
362 put " ""&rmc_fa_path./source/lua""";
363 put " %sysfunc(prxchange(s/[""]/""/i, -1, &existing_lua.))";
367 put "libname &dr_libref. meta liburi = ""SASLibrary?@Name='&dr_library_name.'"" metaout = data;";
370 put "libname &mart_libref. meta liburi = ""SASLibrary?@Name='&mart_library_name.'"" metaout = data;";
373 put "%sysfunc(prxchange(s/[""]/""/i, -1, %superq(lasr_libname_stmt)))";
376 put "libname &rmc_libref. meta liburi = ""SASLibrary?@Name='&rmc_library_name.'"" metaout = data;";