SAS Documentation
SASĀ® Solution for Stress Testing
Reference manual - version 08.2021
Loading...
Searching...
No Matches
irmst_node_get_portfolio.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 Portfolio Data
7
8 \param[in] ST_PRM.RUN_OPTION parameter table
9 \param[in] ST_CFG.CREDIT_STRESS_CONFIG Credit Stress Analysis configuration table
10 \param[out] ST_STG.CREDIT_PORTFOLIO_SYNC Output synchronization table for the CREDIT_PORTFOLIO view.
11
12 \details
13
14 This node makes a call to macro \link irm_rgf_retrieve_analysis_data.sas \endlink to retrieve the portfolio table from the data repository.
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%if(%sysevalf(%superq(portfolio_key)ne,boolean)) %then %do ;
31 %let ticket =;
32 %irm_rgf_retrieve_analysis_data(key = &portfolio_key.
33 , libref = rqsst
34 , outds = ST_STG.CREDIT_PORTFOLIO
35 , outds_partition_list = partition_list
36 , out_type = deferred
37 , outds_dataInfo = portfolio_dataInfo
38 , outds_dataDef = portfolio_dataDef
39 , host = &rgf_protocol.://&rgf_host.
40 , server = &rgf_service.
41 , solution = rmc
42 , port = &rgf_port.
43 , tgt_ticket = &tgt_ticket.
44 , username = &irm_user_id.
45 , password = &irm_user_password.
46 , outVarTicket = ticket
47 , outSuccess = httpSuccess
48 , outResponseStatus = responseStatus
49 , restartLUA = Y
50 , clearCache = Y
51 );
52%end;
53
54%if(%sysevalf(%superq(portfolio_key)ne,boolean)) %then %do ;
55 /* Collect all properties of the object that was retrieved */
56 data ST_STG.PORTFOLIO_DATAINFO;
57 merge
58 portfolio_dataInfo(rename = (key = analysisDataKey name = analysisDataName))
59 portfolio_dataDef(rename = (key = dataDefinitionKey name = dataDefinitionName))
60 ;
61 run;
62
63/* Create synchronization table for downstream processing */
64data ST_STG.SYNC_CREDIT_PORTFOLIO;
65 length
66 table_name $100.
67 data_type $20.
68 status $20.
69 ;
70 table_name = "ST_STG.CREDIT_PORTFOLIO";
71 data_type = "View";
72 status = "Created";
73run;
74%end;
75%else %do;
76 /*Create empty data info table*/
77 data ST_STG.PORTFOLIO_DATAINFO;
78 attrib
79 sourceSystemCd length= $16. label='Source system code'
80 cyclesKey length= $16. label='Cycle key'
81 schemaName length= $16. label='Schema name'
82 schemaVersion length= $16. label='Schema version'
83 metaLibraryNm length= $16. label='Meta library name'
84 ;
85 run;
86 data ST_STG.SYNC_CREDIT_PORTFOLIO;
87 length
88 table_name $100.
89 data_type $20.
90 status $20.
91 ;
92 run;
93
94%end;
95
96/* Cleanup session */
97%irm_session_cleanup;