25%let host = %sysget(RGF_HOST);
26%let port = %sysget(RGF_PORT);
27%let server = %sysfunc(coalescec(%sysget(RGF_SERVER),SASRiskGovernanceFramework));
28%let solution = %sysfunc(coalescec(%sysget(RGF_SOLUTION),rmc));
29%let username = %sysget(RGF_USER);
30%let password = %sysget(RGF_PASSWD);
31%let solution_version = %sysget(SOLUTION_VERSION);
32%let stratum_version = %sysget(STRATUM_VERSION);
33%let scenario_file_path = %sysget(SCENARIO_FILE_PATH);
34%let perspective = %sysget(PERSPECTIVE_ID);
35%let param_table_path = %sysget(PARAM_TABLE_PATH);
36%let param_table_name = %sysget(PARAM_TABLE_NAME);
37%let log_level = %sysfunc(coalescec(%sysget(LOG_LEVEL),1));
45%put &=solution_version;
46%put &=stratum_version;
47%put &=scenario_file_path;
49%put &=param_table_path;
50%put &=param_table_name;
58%let fa_path = %sysfunc(metadata_appprop(IRM Mid-Tier Server, com.sas.solutions.risk.irm.fa.&solution_version.));
59%let fa_id = %scan(&fa_path., -1, \/);
60%let source_path = %sysfunc(prxchange(s/([\\\/]&fa_id.)?[\\\/]*$
63%
if %sysevalf(%superq(stratum_version) =,
boolean) %then %
do;
64 %let stratum_version = rmc.*;
68%include
"&source_path./&fa_id./source/sas/ucmacros/irm_setup.sas";
69%irm_setup(source_path = &source_path.
71 , rmc_fa_id = &stratum_version.
75%irm_set_logging_options();
78%
if "&stratum_version." eq
"rmc.*" %then %
do;
80 %irm_get_swc_property(swc_name = IRM Mid-Tier Server
81 , property = com.sas.solutions.risk.irm.fa.(?!readonly.)&stratum_version.
82 , outvar = swc_property_value
83 , out_ds = irm_federated_areas_rmc
84 , pattern_match_flg = Y
87 proc sort data = irm_federated_areas_rmc;
88 by descending property_name;
92 set irm_federated_areas_rmc (obs=1);
93 call symputx(
"stratum_version", substr(property_name, index(property_name,
".rmc.")+1),
"L");
95 %put NOTE: Using RMC version &stratum_version.
for Cycle data loader.;
100 %sysfunc(getoption(notes))
101 %sysfunc(getoption(symbolgen))
102 %sysfunc(getoption(mprint))
103 %sysfunc(getoption(mlogic))
105option nonotes nosgen nomprint nomlogic;
109%irm_rest_get_ticket(url = &host.:&port.
110 , username = &username.
111 , password = &password.
113 , outVarTicket = rgf_tgt_ticket
117option &oldLogOptions.;
120%macro read_workflow_table(filePath =, fileName =);
122 %
if %sysfunc(prxmatch(/.*\.xlsx/i, %bquote(&fileName.))) %then %
do;
123 libname batch XLSX
"&filePath.\&fileName.";
126 set batch.workflow(where=(substr(cycle, 1, 1) ne
'#'));
127 if not missing(cycle);
141 set batch.seg_schemes;
148 set batch.alloc_schemes;
153 data bus_evolution_plans;
155 set batch.bus_evolution_plans;
160 data synthInstAllocations;
162 set batch.synthInstAllocations;
169 select count(*) into : cycle_table_exists
170 from dictionary.tables
171 where libname = 'BATCH' and memname = 'CYCLES';
173 %if &cycle_table_exists. %then %do;
174 data create_cycle_info;
183 %if %sysfunc(exist(workflow)) = 0 %then %do;
184 %put Specified Excel file does not exist in &filePath.;
188 %else %if %sysfunc(prxmatch(/.*\.sas7bdat/i, %bquote(&fileName.))) %then %do;
189 libname batch "&filePath.";
191 set batch.%sysfunc(prxchange(s/(.*).sas7bdat$/$1/i, 1, %bquote(&workflow_table_name)))(where=(substr(cycle, 1, 1) ne '
#'));
192 if not missing(cycle);
195 %
if %sysfunc(exist(workflow)) = 0 %then %
do;
196 %put Specified SAS dataset &fileName. does not exist in &filePath.;
201 %put ERROR: File extension not recognized. File extension must be .xlsx or .sas7bdat;
207%read_workflow_table(filePath=¶m_table_path.
208 , fileName=¶m_table_name.);
214%macro create_new_cycles();
219 set create_cycle_info end=last;
220 call symputx(cats(
"cycle_id_", put(_N_, 8.)), cycle_id,
"L");
221 call symputx(cats(
"cycle_name_", put(_N_, 8.)), cycle_name,
"L");
222 call symputx(cats(
"cycle_desc_", put(_N_, 8.)), cycle_description,
"L");
223 call symputx(cats(
"cycle_base_dt_", put(_N_, 8.)), cycle_base_dt,
"L");
224 call symputx(cats(
"entity_id_", put(_N_, 8.)), entity_id,
"L");
225 call symputx(cats(
"initial_run_flg_", put(_N_, 8.)), initial_run_flg,
"L");
226 call symputx(cats(
"workflow_template_id_", put(_N_, 8.)), workflow_template_id,
"L");
227 call symputx(cats(
"dimensional_points_", put(_N_, 8.)), dimensional_points,
"L");
228 call symputx(cats(
"control_framework_id_", put(_N_, 8.)), control_framework_id,
"L");
229 call symputx(cats(
"func_currency_", put(_N_, 8.)), func_currency,
"L");
230 call symputx(cats(
"prev_afs_filter_", put(_N_, 8.)), previous_AFS_results_filter,
"L");
231 call symputx(cats(
"prev_frhtm_filter_", put(_N_, 8.)), previous_FRHTM_results_filter,
"L");
233 call symputx(
"tot_cycles", _N_,
"L");
235 %
do c = 1 %to &tot_cycles.;
239 %let responseStatus=;
240 %irm_rest_get_rgf_basic_info( object_uri = workflowTemplates
243 , tgt_ticket = &rgf_tgt_ticket.
244 , filter = filter=eq(objectId,%27&&workflow_template_id_&c..%27)
245 , outds = workflow_template_&c.
246 , outVarTicket = ticket
247 , outSuccess = httpSuccess
248 , outResponseStatus = responseStatus
251 %
if &httpSuccess ne 1 or %rsk_attrn(workflow_template_&c., NLOBS) eq 0 %then %
do;
252 %put ERROR: Could not find workflow
template with
id &&workflow_template_id_&c.. when creating cycle &&cycle_name_&c... Execution stopped due to errors.;
257 set workflow_template_&c.;
258 call symputx(
"workflow_template_key_&c.", key,
"L");
260 %let objectLinks = %bquote([{
"linkTypeId":
"wfTemplate_cycle",
"businessObject1": &&workflow_template_key_&c..});
262 %
if (
"&&control_framework_id_&c.." ne
"" and
"&&control_framework_id_&c.." ne
".") %then %
do;
266 %let responseStatus=;
267 %irm_rest_get_rgf_basic_info( object_uri = controlFrameworks
270 , tgt_ticket = &rgf_tgt_ticket.
271 , filter = filter=eq(objectId,%27&&control_framework_id_&c..%27)
272 , outds = control_framework_&c.
273 , outVarTicket = ticket
274 , outSuccess = httpSuccess
275 , outResponseStatus = responseStatus
278 %
if &httpSuccess ne 1 %then %
do;
279 %put ERROR: Could not find control framework with
id &&control_framework_id_&c.. when creating cycle &&cycle_name_&c... Execution stopped due to errors.;
284 set control_framework_&c.;
285 call symputx(
"control_framework_key_&c.", key,
"L");
287 %let objectLinks = %bquote(&objectLinks., {
"linkTypeId":
"cycle_controlFramework",
"businessObject2": &&control_framework_key_&c..}]);
290 %let objectLinks = %bquote(&objectLinks.]);
295 %let responseStatus=;
296 %irm_rest_create_rgf_cycle(host = &host.
298 , solution = &solution.
299 , perspective = %lowcase(&perspective.)
301 , tgt_ticket = &rgf_tgt_ticket.
302 , name = &&cycle_name_&c..
303 , cycleId = &&cycle_id_&c..
304 , description = &&cycle_desc_&c..
305 , versionNm = &solution_version.
306 , baseDt = &&cycle_base_dt_&c..
307 , rmcVersionNm = &stratum_version.
308 , entityId = &&entity_id_&c..
309 %
if %sysevalf(%superq(initial_run_flg_&c.) ne,
boolean) %then %
do;
310 , initialRunFlg =
true
312 , funcCurrency = &&func_currency_&c..
313 , dimensional_points = &&dimensional_points_&c..
314 , objectLinks = &objectLinks.
315 , outds = cycle_info_&c.
316 , outVarTicket = ticket
317 , outSuccess = httpSuccess
318 , outResponseStatus = responseStatus
321 %
if &httpSuccess ne 1 %then %
do;
322 %put ERROR: Could not create cycle &&cycle_name_&c... Execution stopped due to errors.;
328 call symputx(
"cycle_key_&c.", key,
"L");
331 %
if %lowcase(&&initial_run_flg_&c..) eq
false or %lowcase(&&initial_run_flg_&c..) eq no %then %
do;
333 filename get_resp temp;
338 %let requestUrlCycle_&c. = &host.:&port./&server./rest/&solution./cycles/&&cycle_key_&c..;
341 %let responseStatus=;
342 %irm_rest_request(url = &&requestUrlCycle_&c..
345 , tgt_ticket = &rgf_tgt_ticket.
346 , headerIn = Accept:application/json
348 , parser = sas.risk.irm.rgf_rest_parser.rmcRestCycle
350 , headerOut = get_resp
351 , outVarTicket = ticket
352 , outSuccess = httpSuccess
353 , outResponseStatus = responseStatus
355 %
if &httpSuccess ne 1 %then %
do;
356 %put Task: &task_name.... Execution stopped due to errors. Bad request on GET to cycle &cycle_key..;
360 length Header $ 50 Value $ 200;
361 infile get_resp dlm=
':';
362 input Header $ Value $;
364 call symputx(
'etag', Value);
367 filename headin temp;
370 put
'Accept: application/json';
371 put
"If-Match: &etag.";
373 filename cycleBdy temp;
376 put
"{""key"": &&cycle_key_&c..";
377 put
" , ""changeReason"": ""Batch execution update - set Initial Run Flag to No.""";
378 put
" , ""customFields"": {";
379 put
" ""initialRunFlg"":false";
385 %let responseStatus=;
386 %irm_rest_request(url = &&requestUrlCycle_&c..;
389 , tgt_ticket = &rgf_tgt_ticket.
392 , parser = sas.risk.irm.rgf_rest_parser.rmcRestCycle
394 , outVarTicket = ticket
395 , outSuccess = httpSuccess
396 , outResponseStatus = responseStatus
398 %
if &httpSuccess ne 1 %then %
do;
399 %put ERROR: PATCH request to update Initial Run Flag failed. Execution stopped due to errors.;
402 filename cycleBdy clear;
403 filename get_resp clear;
404 filename headin clear;
409%
if %rsk_dsexist(create_cycle_info) %then %
do;
410 %create_new_cycles();
418%let perspective_id = %sysfunc(upcase(&perspective.));
421%irmc_get_dim_point_from_groovy(query_type = emptyLocationWithPerspectiveNodes
422 , perspective_id = &perspective_id.
423 , outVar = dim_point_key
426 , solution = &solution.
428 , tgt_ticket = &rgf_tgt_ticket.
429 , outVarTicket = ticket
430 , outSuccess = httpSuccess
431 , outResponseStatus = responseStatus
435%macro import_rsm_scenarios(scen_info_table=);
438 create table rsm_scen_files as
439 select distinct file_name
442 from &scen_info_table.;
445 %let num_scen_files = %rsk_attrn(rsm_scen_files, nlobs);
447 %
do s = 1 %to &num_scen_files.;
450 set rsm_scen_files (firstobs = &s. obs=%eval(&s.));
451 call symputx(
"curr_file_name", file_name,
"L");
452 call symputx(
"curr_workgroup", workgroup,
"L");
453 call symputx(
"curr_history_date", history_date,
"L");
458 %let responseStatus=;
459 %irm_rest_create_rsm_scenario(host = &host.
460 , server = SASRiskScenarioManager
462 , tgt_ticket = &rgf_tgt_ticket.
463 , historyDate = &curr_history_date.
464 , workGroup = &curr_workgroup.
465 , dirPath = &scenario_file_path.
466 , fileName = &curr_file_name.
467 , outVarTicket = ticket
468 , outSuccess = httpSuccess
469 , outResponseStatus = responseStatus
472 %
if &httpSuccess ne 1 %then %
do;
473 %put ERROR: Could not upload scenario &curr_file_name. with workgroup &curr_workgroup. and history date &curr_history_date. to SAS Risk Scenario Manager. Execution stopped due to errors.;
480%macro process_scenarios(scen_info_table=);
481 %
if %rsk_dsexist(&scen_info_table.) %then %
do;
484 create table mrs_scenarios as
485 select distinct workgroup
490 from &scen_info_table.;
493 %let num_scenarios = %rsk_attrn(mrs_scenarios, nlobs);
495 %
do s = 1 %to &num_scenarios.;
497 proc datasets lib=work nolist nowarn;
498 delete curr_mrs_data;
502 data mrs_scenarios_enriched;
503 length filterExp $1024.;
504 set &scen_info_table.;
505 filterExp =
"name=" || strip(tab_name) ||
"%nrstr(&)workGroup=" || strip(workgroup);
510 set mrs_scenarios (firstobs = &s. obs=%eval(&s.));
511 call symputx(
"curr_workgroup", workgroup,
"L");
512 call symputx(
"curr_mrs_name", mrs_name,
"L");
513 call symputx(
"curr_mrs_short_name", mrs_short_name,
"L");
514 call symputx(
"curr_mrs_desc", mrs_description,
"L");
515 call symputx(
"curr_multiForecastFlg", multiForecastFlg,
"L");
520 %irm_rest_get_rgf_mrs(host = &host.
522 , solution = &solution.
524 , tgt_ticket = &rgf_tgt_ticket.
525 , filter = filter=eq(name,%27&curr_mrs_name.%27)
527 , outds = curr_mrs_data
528 , outVarTicket = ticket
529 , outSuccess = httpSuccess
530 , outResponseStatus = responseStatus
533 %
if(%rsk_attrn(curr_mrs_data, nlobs) ne 0) %then %
do;
534 %put WARNING: A Master Risk Scenario with the name &curr_mrs_name. already exists. Skipping the creation of
this MRS.;
539 %let this_forecastTime = ;
545 :this_filter separated by
','
546 ,:this_forecastTime separated by
','
548 mrs_scenarios_enriched
550 mrs_name eq
"&curr_mrs_name."
557 %let responseStatus=;
558 %irm_rest_create_rgf_mrs(host = &host.
560 , solution = &solution.
562 , tgt_ticket = &rgf_tgt_ticket.
563 , name = &curr_mrs_name.
564 , description = &curr_mrs_desc.
565 , mrsShortName = &curr_mrs_short_name.
566 , multiForecastFlg = &curr_multiForecastFlg.
567 , forecastTime = %superq(this_forecastTime)
568 , scenario_filters = %superq(this_filter)
569 , dimensional_points = &dim_point_key.
570 , outds = master_risk_scenario_&s.
571 , outVarTicket = ticket
572 , outSuccess = httpSuccess
573 , outResponseStatus = responseStatus
576 %
if &httpSuccess ne 1 %then %
do;
577 %put ERROR: Could not create Master Risk Scenario
for scenario &curr_mrs_name.. Execution stopped due to errors.;
586%import_rsm_scenarios(scen_info_table=scen_info);
587%process_scenarios(scen_info_table=scen_info);
593%macro create_new_seg_schemes();
595 %let tot_seg_schemes = 0;
598 set seg_schemes end=last;
599 call symputx(cats(
"seg_name_", put(_N_, 8.)), name,
"L");
600 call symputx(cats(
"seg_description_", put(_N_, 8.)), description,
"L");
601 call symputx(cats(
"seg_variables_", put(_N_, 8.)), segmentation_variables,
"L");
602 call symputx(cats(
"schema_name_", put(_N_, 8.)), schema_name,
"L");
603 call symputx(cats(
"schema_version_", put(_N_, 8.)), schema_version,
"L");
605 call symputx(
"tot_seg_schemes", _N_,
"L");
607 %
do c = 1 %to &tot_seg_schemes.;
611 %let responseStatus=;
612 %irm_rest_get_rgf_basic_info( object_uri = segments
615 , tgt_ticket = &rgf_tgt_ticket.
616 , filter = filter=eq(name,%27&&seg_name_&c..%27)
617 , outds = existing_seg_scheme_&c.
618 , outVarTicket = ticket
619 , outSuccess = httpSuccess
620 , outResponseStatus = responseStatus
622 %
if(%rsk_attrn(existing_seg_scheme_&c., nlobs) ne 0) %then %
do;
623 %put WARNING: A Segmentation Scheme with the name &&seg_name_&c.. already exists. Skipping the creation of
this segmentation scheme.;
629 %let responseStatus=;
630 %irm_rest_create_rgf_seg_scheme(host = &host.
632 , tgt_ticket = &rgf_tgt_ticket.
633 , name = &&seg_name_&c.
634 , description = &&seg_description_&c.
635 , dimensional_points = &dim_point_key.
636 , segmentVariables = %bquote(&&seg_variables_&c.)
637 , schemaName = &&schema_name_&c.
638 , schemaVersion = &&schema_version_&c.
639 , outds = segmentation_scheme_&c.
640 , outVarTicket = ticket
641 , outSuccess = httpSuccess
642 , outResponseStatus = responseStatus
645 %
if &httpSuccess ne 1 or %rsk_attrn(segmentation_scheme_&c., NLOBS) eq 0 %then %
do;
646 %put ERROR: Could not create segmentation scheme with name &&seg_name_&c... Execution stopped due to errors.;
657%macro create_new_alloc_schemes();
659 %let tot_alloc_schemes = 0;
662 set alloc_schemes end=last;
663 call symputx(cats(
"alloc_name_", put(_N_, 8.)), name,
"L");
664 call symputx(cats(
"alloc_description_", put(_N_, 8.)), description,
"L");
665 call symputx(cats(
"strategyMethod_", put(_N_, 8.)), strategyMethod,
"L");
666 call symputx(cats(
"segScheme_lookup_", put(_N_, 8.)), segScheme_lookup,
"L");
667 call symputx(cats(
"synthInstAllocation_lookup_", put(_N_, 8.)), synthInstAllocation_lookup,
"L");
668 call symputx(cats(
"segmentationVars_", put(_N_, 8.)), segmentationVars,
"L");
669 call symputx(cats(
"synthInst_lookup_", put(_N_, 8.)), synthInst_lookup,
"L");
671 call symputx(
"tot_alloc_schemes", _N_,
"L");
673 %
do c = 1 %to &tot_alloc_schemes.;
677 %let responseStatus=;
678 %irm_rest_get_rgf_basic_info( object_uri = allocationSchemes
681 , tgt_ticket = &rgf_tgt_ticket.
682 , filter = filter=eq(name,%27&&alloc_name_&c..%27)
683 , outds = existing_alloc_scheme_&c.
684 , outVarTicket = ticket
685 , outSuccess = httpSuccess
686 , outResponseStatus = responseStatus
688 %
if(%rsk_attrn(existing_alloc_scheme_&c., nlobs) ne 0) %then %
do;
689 %put WARNING: An Allocation Scheme with the name &&alloc_name_&c.. already exists. Skipping the creation of
this allocation scheme.;
693 %
if(
"" ne
"&&synthInstAllocation_lookup_&c.") %then %
do;
694 data synthInstAllocations_&c.;
695 set synthInstAllocations;
696 where
"&&synthInstAllocation_lookup_&c." eq synthInstAllocation_lookup;
697 drop synthInstAllocation_lookup;
703 %let responseStatus=;
704 %irm_rest_create_rgf_alloc_scheme(host = &host.
707 , perspective = %lowcase(&perspective)
708 , tgt_ticket = &rgf_tgt_ticket.
709 , name = &&alloc_name_&c.
710 , description = &&alloc_description_&c.
711 , segSchemeFilter = eq(name,%27&&segScheme_lookup_&c.%27)
712 , method = &&strategyMethod_&c.
713 %
if(%sysfunc(exist(synthInstAllocations))) %then %
do;
714 , allocationToInstruments = synthInstAllocations_&c.
716 , synthInstFilter = eq(name, %27&&synthInst_lookup_&c.%27)
718 , outVarTicket = ticket
719 , outSuccess = httpSuccess
720 , outResponseStatus = httpResponseStatus
723 %
if &httpSuccess ne 1 or %rsk_attrn(outAlloc, NLOBS) eq 0 %then %
do;
724 %put ERROR: Could not create allocation scheme with name &&alloc_name_&c... Execution stopped due to errors.;
735%macro create_object_instance( collectionName =
737 , runFinalize =
false
738 , sourceSystemCd = RMC
741 , dimensional_points =
742 , custFieldsFileref =
743 , status = outSuccess
746 length value $ 32000 type $ 32;
748 value =
"{""sourceSystemCd"": ""%upcase(&sourceSystemCd.)"", ""name"":""&objName."", ""description"":""&objDesc.""";
752 %
if(%sysevalf(%superq(dimensional_points) ne,
boolean)) %then %
do;
753 value =
", ""dimensionalPoints"": &dimensional_points.";
758 value =
" , ""customFields"": {";
762 value =
"&custFieldsFileref.";
772 %irm_append_many(file=_body,append=appends,overwrite=Y);
774 %let responseHeader=;
780 %irm_rest_request(url = &host.:&port./&server./rest/&solution.-%lowcase(&perspective.)/&collectionName.
783 , tgt_ticket = &rgf_tgt_ticket.
784 , headerIn = Accept:application/json
786 , parser = sas.risk.irm.rgf_rest_parser.rmcRestDataDefinition
789 , outVarTicket = ticket
790 , outSuccess = &status.
791 , outResponseStatus = responseHeader
800 call symputX(
'new_key',key);
803 %
if (%qupcase(&runFinalize.) eq TRUE) %then %
do;
805 filename payload temp;
807 %irm_rest_request(url = &host.:&port./&server./rest/&solution.-%lowcase(&perspective.)/uiContexts/&collectionName./&new_key.
810 , tgt_ticket = &rgf_tgt_ticket.
811 , headerIn = Accept:application/json
812 , body = %str({
"SCREENID":
"CustomObject&custObjNum."})
816 , outVarTicket = ticket
817 , outSuccess = &status.
818 , outResponseStatus = responseHeader
821 %irm_rest_request(url = &host.:&port./&server./rest/&solution.-%lowcase(&perspective.)/uiContexts/&collectionName./&new_key.
824 , tgt_ticket = &rgf_tgt_ticket.
825 , headerIn = Accept:application/json
830 , outVarTicket = ticket
831 , outSuccess = &status.
832 , outResponseStatus = responseHeader
837%mend create_object_instance;
843%macro substituteFSPkeys(var);
844 &var. = prxchange(
"s/\-\-SEGSCHEME_OF\-\-/&SEGSCHEME_OF./", -1, &var.);
845 &var. = prxchange(
"s/\-\-SEGSCHEME_PL\-\-/&SEGSCHEME_PL./", -1, &var.);
846 &var. = prxchange(
"s/\-\-SEGSCHEME_GL\-\-/&SEGSCHEME_GL./", -1, &var.);
848 &var. = prxchange(
"s/\-\-DATA_OF\-\-/&DATA_OF./", -1, &var.);
849 &var. = prxchange(
"s/\-\-DATA_PL\-\-/&DATA_PL./", -1, &var.);
850 &var. = prxchange(
"s/\-\-DATA_GL\-\-/&DATA_GL./", -1, &var.);
851 &var. = prxchange(
"s/\-\-DATA_RWA\-\-/&DATA_RWA./", -1, &var.);
853 &var. = prxchange(
"s/\-\-DATAMAP_OF\-\-/&DATAMAP_OF./", -1, &var.);
854 &var. = prxchange(
"s/\-\-DATAMAP_PL\-\-/&DATAMAP_PL./", -1, &var.);
855 &var. = prxchange(
"s/\-\-DATAMAP_GL\-\-/&DATAMAP_GL./", -1, &var.);
857 &var. = prxchange(
"s/\-\-MODEL_FSP\-\-/&MODEL_FSP./", -1, &var.);
858 &var. = prxchange(
"s/\-\-BEP_BSP\-\-/&BEP_BSP./", -1, &var.);
859%mend substituteFSPkeys;
861%macro updateFSPfiles(oldFileRef=
863 ,clearOldFileRef=
true
864 ,clearNewFileRef=
false
867 length text $2000 left $1000 middle $1000 right $1000;
869 fileout = fopen(
"&newFileRef.",
"O",1000,
"B");
870 filein = fopen(
"&oldFileRef.",
'I',1000,
"B");
871 do while(fread(filein)=0);
872 rc = fget(filein,text,1000);
873 text = strip(right) || strip(text);
876 third = floor(len/3);
878 left = substr(text,1,half);
879 right = substr(text,half+1);
880 %substituteFSPkeys(left);
881 %substituteFSPkeys(right);
882 text = strip(left) || strip(right);
884 left = substr(text,1,third);
885 middle = substr(text,third+1,third);
886 right = substr(text,2*third+1);
887 %substituteFSPkeys(left);
888 %substituteFSPkeys(middle);
889 %substituteFSPkeys(right);
891 text = strip(left) || strip(middle);
892 rc = fput(fileout, strip(text));
896 rc = fput(fileout, strip(right));
899 rc = fclose(fileout);
902 %
if (
"&clearOldFileRef." eq
"true") %then %
do;
903 filename &oldFileRef.;
905 %
if (
"&clearNewFileRef." eq
"true") %then %
do;
906 filename &newFileRef.;
914%macro create_new_bus_evolution_plans();
916 %let tot_business_evol_plans = 0;
919 set bus_evolution_plans end=last;
920 call symputx(cats(
"bus_evol_name_", put(_N_, 8.)), name,
"L");
921 call symputx(cats(
"bus_evol_description_", put(_N_, 8.)), description,
"L");
922 call symputx(cats(
"BEPDetails_file_", put(_N_, 8.)), BEPDetails_file,
"L");
923 call symputx(cats(
"planningData_lookup_", put(_N_, 8.)), planningData_lookup,
"L");
924 call symputx(cats(
"allocationScheme_lookup_", put(_N_, 8.)), allocationScheme_lookup,
"L");
925 call symputx(cats(
"bepType_", put(_N_, 8.)), bepType,
"L");
926 call symputx(cats(
"segScheme_OF_lookup_", put(_N_, 8.)), segScheme_OF_lookup,
"L");
927 call symputx(cats(
"segScheme_PL_lookup_", put(_N_, 8.)), segScheme_PL_lookup,
"L");
928 call symputx(cats(
"segScheme_GL_lookup_", put(_N_, 8.)), segScheme_GL_lookup,
"L");
929 call symputx(cats(
"data_OF_lookup_", put(_N_, 8.)), data_OF_lookup,
"L");
930 call symputx(cats(
"data_PL_lookup_", put(_N_, 8.)), data_PL_lookup,
"L");
931 call symputx(cats(
"data_GL_lookup_", put(_N_, 8.)), data_GL_lookup,
"L");
932 call symputx(cats(
"data_RWA_lookup_", put(_N_, 8.)), data_RWA_lookup,
"L");
933 call symputx(cats(
"dataMap_OF_lookup_", put(_N_, 8.)), dataMap_OF_lookup,
"L");
934 call symputx(cats(
"dataMap_PL_lookup_", put(_N_, 8.)), dataMap_PL_lookup,
"L");
935 call symputx(cats(
"dataMap_GL_lookup_", put(_N_, 8.)), dataMap_GL_lookup,
"L");
936 call symputx(cats(
"model_FSP_lookup_", put(_N_, 8.)), model_FSP_lookup,
"L");
938 call symputx(
"tot_business_evol_plans", _N_,
"L");
941 %
do c = 1 %to &tot_business_evol_plans.;
945 %let responseStatus=;
946 %irm_rest_get_rgf_basic_info( object_uri = businessEvolutionPlans
949 , tgt_ticket = &rgf_tgt_ticket.
950 , filter = filter=eq(name,%27&&bus_evol_name_&c..%27)
951 , outds = existing_bep_&c.
952 , outVarTicket = ticket
953 , outSuccess = httpSuccess
954 , outResponseStatus = responseStatus
956 %
if(%rsk_attrn(existing_bep_&c., nlobs) ne 0) %then %
do;
957 %put WARNING: A Business Evolution Plan with the name &&bus_evol_name_&c.. already exists. Skipping the creation of
this BEP.;
961 %
if (
"&&bepType_&c.." eq
"FINSTATEMENT") %then %
do;
963 %let seg_of_name_&c. = %sysfunc(prxchange(s/%nrstr(&)/%nrstr(%26)/i, -1, &&segScheme_OF_lookup_&c..));
964 %let seg_pl_name_&c. = %sysfunc(prxchange(s/%nrstr(&)/%nrstr(%26)/i, -1, &&segScheme_PL_lookup_&c..));
965 %let seg_gl_name_&c. = %sysfunc(prxchange(s/%nrstr(&)/%nrstr(%26)/i, -1, &&segScheme_GL_lookup_&c..));
966 %let seg_scheme_filter = in(name,%27&&seg_of_name_&c..%27,%27&&seg_pl_name_&c..%27,%27&&seg_gl_name_&c..%27)%nrstr(&sortBy=key&fields=name,key);
968 %let responseStatus=;
969 %irm_rest_get_rgf_basic_info( object_uri = segments
972 , tgt_ticket = &rgf_tgt_ticket.
973 , filter = filter=&seg_scheme_filter.
974 , outds = seg_schemes_&c.
975 , outVarTicket = ticket
976 , outSuccess = httpSuccess
977 , outResponseStatus = responseStatus
979 %
if &httpSuccess ne 1 %then %
do;
980 %put ERROR: Could not find segmentation schemes
for specified lookup keys. Execution stopped due to errors.;
985 if(name eq
"&&segScheme_OF_lookup_&c..") then
986 call symputX(
'SEGSCHEME_OF',key);
987 if(name eq
"&&segScheme_PL_lookup_&c..") then
988 call symputX(
'SEGSCHEME_PL',key);
989 if(name eq
"&&segScheme_GL_lookup_&c..") then
990 call symputX(
'SEGSCHEME_GL',key);
993 %let data_of_name_&c. = %sysfunc(prxchange(s/%nrstr(&)/%nrstr(%26)/i, -1, &&data_OF_lookup_&c..));
994 %let data_pl_name_&c. = %sysfunc(prxchange(s/%nrstr(&)/%nrstr(%26)/i, -1, &&data_PL_lookup_&c..));
995 %let data_gl_name_&c. = %sysfunc(prxchange(s/%nrstr(&)/%nrstr(%26)/i, -1, &&data_GL_lookup_&c..));
996 %let data_rwa_name_&c. = %sysfunc(prxchange(s/%nrstr(&)/%nrstr(%26)/i, -1, &&data_RWA_lookup_&c..));
997 %let data_filter = in(name,%27&&data_of_name_&c..%27,%27&&data_pl_name_&c..%27,%27&&data_gl_name_&c..%27,%27&&data_rwa_name_&c..%27)%nrstr(&sortBy=key&fields=name,key);
999 %let responseStatus=;
1000 %irm_rest_get_rgf_basic_info( object_uri = analysisData
1003 , tgt_ticket = &rgf_tgt_ticket.
1004 , filter = filter=&data_filter.
1005 , outds = analysis_data_&c.
1006 , outVarTicket = ticket
1007 , outSuccess = httpSuccess
1008 , outResponseStatus = responseStatus
1010 %
if &httpSuccess ne 1 %then %
do;
1011 %put ERROR: Could not find analysis data instances
for specified lookup keys. Execution stopped due to errors.;
1015 set analysis_data_&c.;
1016 if(name eq
"&&data_OF_lookup_&c..") then
1017 call symputX(
'DATA_OF',key);
1018 if(name eq
"&&data_PL_lookup_&c..") then
1019 call symputX(
'DATA_PL',key);
1020 if(name eq
"&&data_GL_lookup_&c..") then
1021 call symputX(
'DATA_GL',key);
1022 if(name eq
"&&data_RWA_lookup_&c..") then
1023 call symputX(
'DATA_RWA',key);
1026 %let map_of_name_&c. = %sysfunc(prxchange(s/%nrstr(&)/%nrstr(%26)/i, -1, &&dataMap_OF_lookup_&c..));
1027 %let map_pl_name_&c. = %sysfunc(prxchange(s/%nrstr(&)/%nrstr(%26)/i, -1, &&dataMap_PL_lookup_&c..));
1028 %let map_gl_name_&c. = %sysfunc(prxchange(s/%nrstr(&)/%nrstr(%26)/i, -1, &&dataMap_GL_lookup_&c..));
1029 %let data_map_filter = in(name,%27&&map_of_name_&c..%27,%27&&map_pl_name_&c..%27,%27&&map_gl_name_&c..%27)%nrstr(&sortBy=key&fields=name,key);
1031 %let responseStatus=;
1032 %irm_rest_get_rgf_basic_info( object_uri = dataMaps
1035 , tgt_ticket = &rgf_tgt_ticket.
1036 , filter = filter=&data_map_filter.
1037 , outds = data_maps_&c.
1038 , outVarTicket = ticket
1039 , outSuccess = httpSuccess
1040 , outResponseStatus = responseStatus
1042 %
if &httpSuccess ne 1 %then %
do;
1043 %put ERROR: Could not find data maps
for specified lookup keys. Execution stopped due to errors.;
1048 if(name eq
"&&dataMap_OF_lookup_&c..") then
1049 call symputX(
'DATAMAP_OF',key);
1050 if(name eq
"&&dataMap_PL_lookup_&c..") then
1051 call symputX(
'DATAMAP_PL',key);
1052 if(name eq
"&&dataMap_GL_lookup_&c..") then
1053 call symputX(
'DATAMAP_GL',key);
1056 %let model_name_&c. = %sysfunc(prxchange(s/%nrstr(&)/%nrstr(%26)/i, -1, &&model_FSP_lookup_&c..));
1057 %let model_filter = eq(name,%27&&model_FSP_lookup_&c..%27)%nrstr(&sortBy=key&fields=name,key);
1059 %let responseStatus=;
1060 %irm_rest_get_rgf_basic_info( object_uri = models
1063 , tgt_ticket = &rgf_tgt_ticket.
1064 , filter = filter=&model_filter.
1065 , outds = models_&c.
1066 , outVarTicket = ticket
1067 , outSuccess = httpSuccess
1068 , outResponseStatus = responseStatus
1070 %
if &httpSuccess ne 1 %then %
do;
1071 %put ERROR: Could not find model
for specified lookup keys. Execution stopped due to errors.;
1076 if(name eq
"&&model_FSP_lookup_&c..") then
1077 call symputX(
'MODEL_FSP',key);
1081 %let bep_filter = %nrstr(sortBy=key:descending&limit=1&fields=name,key);
1083 %let responseStatus=;
1084 %irm_rest_get_rgf_basic_info( object_uri = businessEvolutionPlans
1087 , tgt_ticket = &rgf_tgt_ticket.
1088 , filter = &bep_filter.
1090 , outVarTicket = ticket
1091 , outSuccess = httpSuccess
1092 , outResponseStatus = responseStatus
1094 %
if &httpSuccess ne 1 %then %
do;
1095 %put ERROR: Could not find any existing business evolution plans. At least one BEP is needed in order to grab the proper key
for the
new BEP. Execution stopped due to errors.;
1099 set beps_&c. end=last;
1101 call symputX(
'BEP_BSP',key+1);
1105 filename origDtl
"&&BEPDetails_file_&c..";
1106 filename bepDtl&c. temp;
1107 %updateFSPfiles(oldFileRef=origDtl
1108 ,newFileRef=bepDtl&c.
1109 ,clearOldFileRef=
true
1110 ,clearNewFileRef=
false
1116 %let plan_data_name_&c. = %sysfunc(prxchange(s/%nrstr(&)/%nrstr(%26)/i, -1, &&planningData_lookup_&c..));
1117 %let adata_filter = in(name,%27&&plan_data_name_&c..%27)%nrstr(&sortBy=key&fields=name,key);
1119 %let responseStatus=;
1120 %irm_rest_get_rgf_basic_info( object_uri = analysisData
1123 , tgt_ticket = &rgf_tgt_ticket.
1124 , filter = filter=&adata_filter.
1126 , outVarTicket = ticket
1127 , outSuccess = httpSuccess
1128 , outResponseStatus = responseStatus
1130 %
if &httpSuccess ne 1 %then %
do;
1131 %put ERROR: Could not find planning data
for specified lookup key. Execution stopped due to errors.;
1136 if(name eq
"&&planningData_lookup_&c..") then
1137 call symputX(
'plan_data_key',key);
1140 %let alloc_scheme_name_&c. = %sysfunc(prxchange(s/%nrstr(&)/%nrstr(%26)/i, -1, &&allocationScheme_lookup_&c..));
1141 %let alloc_scheme_filter = in(name,%27&&alloc_scheme_name_&c..%27)%nrstr(&sortBy=key&fields=name,key);
1143 %let responseStatus=;
1144 %irm_rest_get_rgf_basic_info( object_uri = allocationSchemes
1147 , tgt_ticket = &rgf_tgt_ticket.
1148 , filter = filter=&alloc_scheme_filter.
1149 , outds = alloc_schemes_&c.
1150 , outVarTicket = ticket
1151 , outSuccess = httpSuccess
1152 , outResponseStatus = responseStatus
1154 %
if &httpSuccess ne 1 %then %
do;
1155 %put ERROR: Could not find allocation scheme
for specified lookup key. Execution stopped due to errors.;
1159 set alloc_schemes_&c.;
1160 if(name eq
"&&allocationScheme_lookup_&c..") then
1161 call symputX(
'allocKey',key);
1164 filename bepDtl&c.
"&&BEPDetails_file_&c..";
1167 filename bepFlds&c. temp;
1168 filename bepPost&c. temp;
1171 set work.bus_evolution_plans;
1172 if _N_ = %eval(&c.) then do;
1173 %if ("&&bepType_&c.." eq "PORTFOLIO") %then %do;
1174 put '"planningDataKey": ' "&plan_data_key." ',';
1175 put '"allocationSchemeKey": ' "&allocKey." ',';
1177 put '"bepShortName": "' bepShortName+(-1) '",';
1178 put '"interval": "' interval+(-1) '",';
1179 put '"intervalCount": ' intervalCount+(-1) ',';
1180 put '"solutionCreatedIn": "' "%upcase(&perspective.)" '",';
1183 %let bep_post_fileref=bepPost&c.;
1185 file &bep_post_fileref.;
1186 set work.bus_evolution_plans;
1187 if _N_ = %eval(&c.) then do;
1188 if not missing(planDataSegsAndTargets) then
1189 put '"planDataSegsAndTargets": "' planDataSegsAndTargets+(-1) '",';
1190 if allocationFlg eq 1 then
1191 put '"allocationFlg": true,';
1193 put '"allocationFlg": false,';
1194 put '"bepType": "' bepType+(-1) '",';
1195 if not missing(segmentationVars) then
1196 put '"segmentationVars": "' segmentationVars+(-1) '",';
1197 if not missing(targetVariables) then
1198 put '"targetVariables": "' targetVariables+(-1) '",';
1199 if not missing(lastSelectedTargetVariable) then
1200 put '"lastSelectedTargetVariable": "' lastSelectedTargetVariable+(-1) '"';
1201 if not missing(bepVarsInfo) then
1202 put '"bepVarsInfo": "' bepVarsInfo+(-1) '"';
1206 %if ("&&bepType_&c.." eq "FINSTATEMENT") %then %do;
1207 filename newPost&c. temp;
1208 %updateFSPfiles(oldFileRef=&bep_post_fileref.;
1209 ,newFileRef=newPost&c.
1210 ,clearOldFileRef=true
1211 ,clearNewFileRef=false
1213 %let bep_post_fileref=newPost&c.;
1216 length value $ 32000 type $ 32;
1217 value = '"BEPDetails": "'; type="
string"; output;
1218 value = "bepDtl&c."; type="fileref"; output;
1219 value = '",'; type="
string"; output;
1220 value = ""; type="newline"; output;
1221 value = "&bep_post_fileref."; type="fileref"; output;
1223 %irm_append_many(file=bepFlds&c.,append=append);
1227 %let responseStatus=;
1228 %create_object_instance( collectionName = businessEvolutionPlans
1230 , runFinalize = true
1231 , objName = &&bus_evol_name_&c.
1232 , objDesc = &&bus_evol_description_&c.
1233 , dimensional_points = &dim_point_key.
1234 , custFieldsFileref = bepFlds&c.
1237 filename bepFlds&c. clear;
1238 filename bepPost&c. clear;
1239 filename bepDtl&c. clear;
1249%macro create_cycle_prev_data_links(linktype=, data_filter=, cycle_key=);
1251 proc datasets lib=work nolist nowarn;
1252 delete __prev_data__;
1257 %let responseStatus=;
1258 %irm_rest_get_rgf_analysis_data(host = &host.
1260 , solution = &solution.
1262 , tgt_ticket = &rgf_tgt_ticket.
1263 , filter = filter=&data_filter.
1264 , outds = __prev_data__
1265 , outVarTicket = ticket
1266 , outSuccess = httpSuccess
1267 , outResponseStatus = responseStatus
1270 %if &httpSuccess. ne 1 %then %do;
1271 %put ERROR: No analysis data instances found using rest filter &data_filter.;
1275 %let prev_data_key =;
1277 set __prev_data__(obs = 1);
1278 call symputx("prev_data_key", key, "L");
1283 %let responseStatus=;
1284 %irm_rest_create_rgf_link_inst(host = &host.
1287 , solution = &solution.
1288 , tgt_ticket = &rgf_tgt_ticket.
1289 , link_type = &linktype.
1290 , business_object1 = &cycle_key.
1291 , business_object2 = &prev_data_key.
1292 , outds = objectLink
1293 , outVarTicket = ticket
1294 , outSuccess = httpSuccess
1295 , outResponseStatus = responseStatus
1298 %if &httpSuccess. ne 1 %then %do;
1299 %put ERROR: Could not create link instance for link type &linktype. with analysis data &data_key. and cycle &cycle_key.;
1305 %let responseStatus=;
1306 %irm_rest_create_rgf_link_inst(host = &host.
1309 , solution = &solution.
1310 , tgt_ticket = &rgf_tgt_ticket.
1311 , link_type = cycle_analysisData_prev
1312 , business_object1 = &cycle_key.
1313 , business_object2 = &prev_data_key.
1314 , outds = objectLink
1315 , outVarTicket = ticket
1316 , outSuccess = httpSuccess
1317 , outResponseStatus = responseStatus
1320 %if &httpSuccess. ne 1 %then %do;
1321 %put ERROR: Could not create link instance for link type cycle_analysisData_prev with analysis data &data_key. and cycle &cycle_key.;
1330%macro read_cycle_info_for_task(task_number);
1332 data cycle_filter (drop =
id: pattern);
1334 if _n_ = &task_number.;
1335 if cycle ne '' then do;
1336 if prxmatch('/.*objectLinks.*\[(.*)\].*/', cycle) then do;
1337 call symputx('_objectLinks_', prxchange('s/.*objectLinks.*\[(.*)\].*/$1/', 1, cycle));
1341 call symputx('_objectLinks_', '%bquote({
"linkTypeId":
"wfTemplate_cycle",
"businessObject1": 10000})
');
1343 pattern = prxparse('s/(\{.*)(
"objectLinks".*\[.*\])(.*\})/$1$3/
');
1344 call prxchange(pattern, -1, cycle);
1345 if prxmatch("/\ACUST_OBJ_\d{1,3}\|\d{5}\|rmc\|\z/", strip(cycle)) = 1 then do;
1346 call symputx('_cycle_filter_
', cats('key=
', scan(cycle, 2, '|
')), 'G
');
1348 else if prxmatch('/\A\d{5}\z/
', strip(cycle)) = 1 then do;
1349 call symputx('_cycle_filter_
', cats('key=
', cycle), 'G
');
1352 id1 = prxparse('s/\s*:\s*/=/i
');
1353 call prxchange(id1, -1, cycle);
1354 id2 = prxparse('s/\s*
"\s*//i');
1355 call prxchange(id2, -1, cycle);
1356 id3 = prxparse('s/\s*,\s*/%nrstr(&)/i');
1357 call prxchange(id3, -1, cycle);
1358 id4 = prxparse('s/[\[{}\]]//i');
1359 call prxchange(id4, -1, cycle);
1360 id5 = prxparse('s/cycleId\s*=/objectId=/i');
1361 call prxchange(id5, -1, cycle);
1362 call symputx('_cycle_filter_', cycle, 'G');
1366 %put &=_cycle_filter_;
1367 /* Retrieve the cycle using the filter from above */
1369 %irm_rest_get_rgf_cycle(host = &host.
1372 , tgt_ticket = &rgf_tgt_ticket.
1373 , filter = &_cycle_filter_.
1376 /* If the cycle does not exist, throw an error and abort */
1377 %if %rsk_attrn(cycle_ds, nobs) = 0 %then %do;
1378 %put ERROR: No cycles found using filter &_cycle_filter_.. Aborting execution.;
1382 /* Get the cycle key from the cycle_ds */
1385 set cycle_ds (obs = 1);
1386 call symputx("cycle_key
", key);
1390/* ------------------------------------------------------------------------------------------------- */
1391/* Execute the cycle */
1392/* ------------------------------------------------------------------------------------------------- */
1395 /* Read the workflow table */
1396 %read_workflow_table(filePath=¶m_table_path.
1397 , fileName=¶m_table_name.);
1398 %let total_tasks = %rsk_attrn(workflow, nobs);
1399 %let task_number = 1;
1400 /* Loop through each task in the workflow table */
1401 %do %while (&task_number. le &total_tasks.);
1402 /* Read the workflow table - we shouldn't have to do this in each loop but unfortunately the
1403 irm_rest_rgf_cycle_run_task macro deletes all work tables */
1404 %read_workflow_table(filePath=¶m_table_path.
1405 , fileName=¶m_table_name.);
1406 /* Get the cycle information for the current task */
1408 %read_cycle_info_for_task(task_number = &task_number.);
1409 %put NOTE: Cycle filter for task &task_number. is &_cycle_filter_.;
1410 %put NOTE: Cycle key for task &task_number. is &cycle_key.;
1411 /* Get the task information for the current task */
1413 set workflow (firstobs = &task_number. obs = &task_number.);
1414 call symputx('cycle', cycle);
1415 call symputx('task_for_parameters', task_for_parameters);
1416 call symputx('activity_choice', activity_choice);
1417 call symputx('transition_choice', transition_choice);
1418 call symputx('analysisRunTitle', analysisRunTitle);
1419 call symputx('waitFlg', waitFlg);
1420 call symputx('control_param_lookup_key', control_param_lookup_key);
1421 call symputx('create_objects', create_objects);
1422 /* If a value was provided for the create_link_instances column, parse the contents to get the link type and filter */
1423 if not missing(create_link_instances) then do;
1424 call symputx('create_link_flg', 'Y', "L
");
1425 num_linktypes = countc(create_link_instances, '{');
1426 call symputx('num_linktypes', num_linktypes, "G
");
1427 do i = 1 to num_linktypes;
1428 curr_link_info = scan(scan(create_link_instances,i,'{'),1,'}');
1429 call symputx(cats('linktype_',put(i,8.)),scan(curr_link_info,1,'='), "G
");
1430 call symputx(cats('linkfilter_',put(i,8.)),scan(curr_link_info,2,'"'), "G");
1434 call symputx('create_link_flg
', 'N
');
1437 /* If the create_link_instances field is not empty, get the cycle key and create the link instance(s) */
1438 %if &create_link_flg. eq Y %then %do;
1439 /* Loop through each link type and create the link instances */
1440 %do l = 1 %to &num_linktypes.;
1441 %if "&&linkfilter_&l.." ne "" %then %do;
1442 %create_cycle_prev_data_links(linktype=&&linktype_&l.., data_filter=&&linkfilter_&l.., cycle_key=&cycle_key.);
1446 /* Else if the create_objects field is not empty, run the macro to process the specified tab */
1447 %else %if ("&create_objects." ne "") %then %do;
1448 %if %sysmacexist(create_new_&create_objects.) %then %do;
1449 %create_new_&create_objects.();
1452 %put WARNING: Could not create objects from tab &create_objects. because no corresponding creation macro was found. Skipping this step..;
1455 /* Otherwise, execute the task */
1457 %irm_rest_rgf_cycle_run_task(host = &host.
1460 , solution = &solution.
1461 , perspective = %lowcase(&perspective.)
1462 , tgt_ticket = &rgf_tgt_ticket.
1463 , cycle = &_cycle_filter_.
1464 , analysisRunTitle = &analysisRunTitle.
1465 , param_table_path = ¶m_table_path.
1466 , param_table_name = ¶m_table_name.
1467 , task_for_parameters = &task_for_parameters.
1468 , activity_choice = &activity_choice.
1469 , transition_choice = &transition_choice.
1470 , waitFlg = &waitFlg.
1471 , control_param_lookup_key = &control_param_lookup_key.
1474 /* Increment the task number */
1475 %let task_number = %eval(&task_number + 1);
1477 /* Done processing all tasks */
1478 %put NOTE: Cycle processing has completed.;
1483/* ------------------------------------------------------------------------------------------------- */
1485/* ------------------------------------------------------------------------------------------------- */