32%macro irmc_mip_cm_eba2020_gen( model_run_key =
35 , computedmethod_name_prefix =
36 , adverse_scenario_name =
37 , basecase_scenario_name =
39 , mip_cm_eba2020_template =
50 set ST_STG.SCENARIO_INFO end=last;
51 retain max_forecasttime 0;
52 max_forecasttime=max(forecastTime,max_forecasttime);
54 call symputX(
'bep_ShortName',bepShortName);
55 call symputX(
'ft_max',max_forecasttime);
61 %
if(%upcase(&mipHorizon.)=MAX or %sysevalf(%superq(mipHorizon) =,
boolean)) %then %
do;
63 set ST_STG.SCENARIO_DATA end=last;
65 max_horizon=max(HORIZON,max_horizon);
67 call symputX(
'cnt_horizon',max_horizon);
72 %let cnt_horizon=&mipHorizon.;
76 %let base_dt_ymdn = %sysfunc(putn(&base_dt., yymmddn8.));
79 %
do i_ft=0 %to &ft_max.;
82 %let cm_name=&computedmethod_name_prefix.&i_ft._&base_dt_ymdn._&model_run_key.;
88 put
'/*Begin: Dynamically assign the values of the following variables.*/';
89 put
'%let period_cnt =' "&cnt_horizon.;";
90 put
'%let ft =' "&i_ft.;";
91 put
'%let Scenario_base =' "&bep_ShortName._&basecase_scenario_name._FT&i_ft.;";
92 put
'%let Scenario_adv =' "&bep_ShortName._&adverse_scenario_name._FT&i_ft.;";
93 put
'%let computedmethod_name =' "&cm_name.;";
94 put
'/*End: Dynamically assign the values of the following variables.*/';
99 %
if &i_ft.=0 %then %
do;
100 data &ds_out_cm_list.;
101 length computedmethod $500.;
102 computedmethod=
"&cm_name.";
105 %
else %
if &i_ft.>0 %then %
do;
106 data &ds_out_cm_list.;
107 set &ds_out_cm_list. end=last;
110 computedmethod=
"&cm_name.";
119 infile
"&mip_cm_eba2020_template." lrecl = 32000;
125 %let httpSuccess = 0;
126 %let responseStatus =;
127 %irm_rest_create_mip_exec_pgm(host = &mip_protocol.:
128 , server = &mip_service.
130 , tgt_ticket = &tgt_ticket.
131 , workgroup = &mip_ms_workgroup.
133 , description = Computed Method
for modeling system &mip_ms_name. (&mip_ms_version.). RGF modelRunkey: &model_run_key.
137 , outds = mip_pre_pgm_detail
138 , outVarTicket = ticket
139 , outSuccess = httpSuccess
140 , outResponseStatus = responseStatus