Examples on Refactoring Insertable Substitution Strings
Example 1
This example illustrates how the ReElDor utility can be used to refactor the insertable substitution strings on a segment named ASegment and model named AModel, without updating the model and storing the logic. The summary of the action performed by executing the command is stored in a log file named AInsSub.log. Use the following command line to do this:
C:\Program Files\Unisys\NGEN\bin>reeldor -I -NoUpdates -M AModel -S ASegment -L AInsSub.log
After its execution, the following summary is displayed in the command line:
*****Logic not updated due to setting of NoUpdate***** Found 2 Elements in Segment ASegment Refactor Insertable ASegment.IGLG Refactor Insertable ASegment.IGLG2 Total Refactor Time: 0.4 seconds Number of updated IGLGs: 1 Number of updated Methods: 4 Total Elapsed Time: 0.4 seconds
The logic in R1.Main and IGLG.Main/IGLG1.Main is left untouched.
Example 2
This example illustrates how the ReElDor utility can be used to refactor the insertable substitution strings on a segment named ASegment a nd model named AModel when NoUpdates is not specified in the command line. The activity log is stored in the log file named AInsSubUpdate.log. Use the following command line to do this:
C:\Program Files\Unisys\NGEN\bin>reeldor -I -M AModel -S ASegment -L AInsSubUpdate.log
After its execution, the following summary is displayed in the command line:
Found 2 Elements in Segment ASegment Refactor Insertable ASegment.IGLG Refactor Insertable ASegment.IGLG2 Total Refactor Time: 0.5 seconds Validation Time: 0.3 seconds Number of updated IGLGs: 1 Number of updated Methods: 4 Total Elapsed Time: 0.8 seconds
The resulting refactored logic is:
IGLG.Main: Move "X" _PARAM1.DA1 :Assign value X to incoming parameter Move "Y" _PARAM2.DA2 :Assign value Y to incoming parameter IGLG2.Main: Move "X" ABC.DA1 :Assign value X to incoming parameter Move "Y" ABC.DA2 :Assign value Y to incoming parameter R1.Main: Insert IGLG (_PARAM1 = ABC\ & _PARAM2 = ABC) Move SYSOP.KDVSAPRO WG_WORK.WG_KDVSAPRO :KDVSAPRO Move GLB.REPNAME GD_REPNAME :GD_REPNAME Move GLB.ZEROS GG_HEADER_SRV_UIT.GG_PAR :GG_PAR Insert IGLG (_PARAM1 = ABC\ & _PARAM2 = XYZ) DoWhen ((GG_HEADER_SRV_UIT.GG_FAR = GD_REP_FAR) AND \ (GD_REP_ASP = GC_NUM)) Insert IGLG (_PARAM1 = GRPA.GRPB\ & _PARAM2 = GRPA.GRPB) Move GLB.ZEROS GG_FAR End R2.Main: Insert IGLG2