SAS Documentation
SASĀ® Solution for Stress Testing
Reference manual - version 08.2021
Loading...
Searching...
No Matches
irmst_node_get_ruleset.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 Rule Set from SAS Risk Governance Framework
7
8 \param[in] ST_PRM.RUN_OPTION parameter table
9 \param[in] %ds_in_config Macrovarload table containing the required parameter RULESET_KEY
10 \param[out] %ds_out Output table containing details of the RuleSet
11
12 \details
13
14 This node makes a call to macro \link irm_rest_get_rgf_rule_set.sas \endlink to retrieve the ruleSet definition from SAS Risk Governance Framework.
15
16 In addition the following macro utilities are called:
17
18 | Macro name | Description | Further information |
19 |---------------------------|--------------------------------------------------------------------------------------------------------------|-----------------------------------------------|
20 | irm_session_prepare | Reads RUN_OPTION table and sets logging options | \link irm_session_prepare.sas \endlink |
21 | 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 |
22
23 \ingroup nodes
24 \author SAS Institute Inc.
25 \date 2018
26*/
27
28/* Initialize session */
29%irm_session_prepare();
30
31%let ticket =;
32%irm_rest_get_rgf_rule_set(host = &rgf_protocol.://&rgf_host.
33 , server = &rgf_service.
34 , solution = &rgf_solution.
35 , port = &rgf_port.
36 , tgt_ticket = &tgt_ticket.
37 , username = &irm_user_id.
38 , password = &irm_user_password.
39 , key = &ruleSet_key.
40 , outds = rule_set_info
41 , outVarTicket = ticket
42 , outSuccess = httpSuccess
43 , outResponseStatus = responseStatus
44 , restartLUA = Y
45 , clearCache = Y
46 );
47
48data &ds_out.;
49 set rule_set_info;
50 /* Workaround for the SQLContraintTransformer which requires a RGF hotfix */
51 filter_exp = prxchange('s/LOWER\‍(\s*(\w+)\s*\‍) like LOWER\‍(\s*"%([^%]+)%"\s*\‍)/prxmatch("\/\Q$2\E\/i", $1)/i', -1, filter_exp);
52 /* Convert != to <> */
53 filter_exp = prxchange("s/(!=)/ne/i", -1, filter_exp);
54 /* If rule set type is Management Action, set the allocation method */
55 if ruleSetType = "MgtActionRuleSet" then do;
56 allocation_method = "INDIVIDUAL";
57 adjustment_type = "INCREMENT";
58 filter_exp = catt(filter_exp, " and (FORECAST_TIME ne 0)");
59 drop record_id;
60 end;
61run;
62
63/* Cleanup session */
64%irm_session_cleanup;