SAS Documentation
SASĀ® Solution for Stress Testing
Reference manual - version 08.2021
Loading...
Searching...
No Matches
irmst_node_mrs_init.sas
Go to the documentation of this file.
1/*
2 Copyright (C) 2018 SAS Institute Inc. Cary, NC, USA
3*/
4
5/** \file
6 \brief Retrieve Master Risk Scenarios
7
8 \param[in] ST_PRM.RUN_OPTION parameter table
9 \param[out] ST_STG.MASTER_RISK_SCENARIOS Output table containing details of the Master Risk Scenarios (and related scenarios) associated with this Analysis Run
10
11 \details
12
13 This node makes a call to macro \link irm_rest_get_rgf_mrs.sas \endlink to retrieve the list of Master Risk Scenarios (and related scenarios) that are linked to the current analysis run.
14
15 In addition the following macro utilities are called:
16
17 | Macro name | Description | Further information |
18 |---------------------------|--------------------------------------------------------------------------------------------------------------|-----------------------------------------------|
19 | irm_session_prepare | Reads RUN_OPTION table and sets logging options | \link irm_session_prepare.sas \endlink |
20 | irm_session_cleanup | Removes all non-IRM WORK datasets/views and deletes all user-created macro variables from workspace session | \link irm_session_cleanup.sas \endlink |
21
22 \ingroup nodes
23 \author SAS Institute Inc.
24 \date 2018
25*/
26
27/* Initialize session */
28%irm_session_prepare();
29
30%let ticket =;
31%irm_rest_get_rgf_mrs(host = &rgf_protocol.://&rgf_host.
32 , server = &rgf_service.
33 , solution = &rgf_solution.
34 , port = &rgf_port.
35 , tgt_ticket = &tgt_ticket.
36 , filter = filter=hasObjectLinkTo('%upcase(&rgf_solution.)','analysisRun_masterRisk', %sysfunc(coalescec(&attrib_curr_analysis_run_id., &analysis_run_id.)),0)
37 , details_flg = Y
38 , outds = curr_mrs_list
39 , outVarTicket = ticket
40 , outSuccess = httpSuccess
41 , outResponseStatus = responseStatus
42 , restartLUA = Y
43 , clearCache = Y
44 );
45
46data &ds_out_mrs.;
47 length analysis_run_id 8.;
48 set curr_mrs_list;
49 analysis_run_id = %sysfunc(coalescec(&attrib_curr_analysis_run_id., &analysis_run_id.));
50run;
51
52
53/* Retrieve MRS scenarios linked to the previous-period analysis run (in case of Attribution Analysis) */
54%if %sysevalf(%superq(attrib_prev_analysis_run_id) ne, boolean) %then %do;
55 %irm_rest_get_rgf_mrs(host = &rgf_protocol.://&rgf_host.
56 , server = &rgf_service.
57 , solution = &rgf_solution.
58 , port = &rgf_port.
59 , tgt_ticket = &tgt_ticket.
60 , filter = filter=hasObjectLinkTo('%upcase(&rgf_solution.)','analysisRun_masterRisk',&attrib_prev_analysis_run_id.,0)
61 , details_flg = Y
62 , outds = prev_mrs_list
63 , outVarTicket = ticket
64 , outSuccess = httpSuccess
65 , outResponseStatus = responseStatus
66 , restartLUA = Y
67 , clearCache = N
68 );
69
70 data prev_mrs_list;
71 length analysis_run_id 8.;
72 set prev_mrs_list;
73 analysis_run_id = &attrib_prev_analysis_run_id.;
74 run;
75
76 /* Append list of scenarios to ouptut */
77 proc append data = prev_mrs_list
78 base = &ds_out_mrs.
79 force;
80 run;
81%end;
82
83/* Initialize Scenario Manager Rest service for downstream processing */
84%let rsmTicket =;
85%irm_rest_request(url = &rsm_protocol.://&rsm_host.:&rsm_port/&rsm_service./rest
86 , method = GET
87 , server = &rsm_service.
88 , tgt_ticket = &tgt_ticket.
89 , parser = restLinks
90 , outds = tmp_rsm_rest_links
91 , outVarTicket = rsmTicket
92 , outSuccess = rsmHttpSuccess
93 , outResponseStatus = rsmResponseStatus
94 , restartLUA = Y
95 , clearCache = Y
96 );
97
98/* Cleanup session */
99%irm_session_cleanup;