Examples on applying Pretty Print

Example 1

This example illustrates how ReElDor utility can be used to reformat the LDL+ logic such that all the end of line comments (if they exist) start from column 70 and start Operand1 at column 10 and Operand2 at column 30. Use the following command line to do this:

C:\Program Files\Unisys\NGEN\bin>reeldor –PP –EOLCC 70 –O1C 10 –O2C 30 -M AModel -S ASegment -L APretty1.log 

Where,

After its execution, the following summary is displayed in the command line:

Found 4 Elements in Segment ASegment
Pretty R1.Main
Pretty IGLG.Main
Pretty IGLG2.Main
Pretty R2.Main
Total Refactor Time: 0.6 seconds
Validation Time: 0.2 seconds
Total Lines of Logic: 21
Number of Pretty Logics: 4
Total Elapsed Time: 0.9 seconds

The reformatted logic appears as follows:

IGLG.Main:

Move     "X"                 _PARAM1.DA1                           :Assign value X to incoming
parameter
Move     "Y"                 _PARAM101.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\
& _PARAM101 = 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\
& _PARAM101 = XYZ)
DoWhen ((GG_HEADER_SRV_UIT.GG_FAR = GD_REP_FAR) AND (GD_REP_ASP = GC_NUM))

     Insert IGLG (_PARAM1 = GRPA.GRPB\
     & _PARAM101 = GRPA.GRPB)
    Move GLB.ZEROS           GG_FAR
End

Example 2

This example illustrates how to use the ReElDor utility on some indented logic in R1.Main as shown below:

R1.Main logic before refactoring:

Move SYSOP.KDVSAPRO WG_WORK.WG_KDVSAPRO :KDVSAPRO
Abort GA_SDK
DoWhen ((GG_HEADER_SRV_UIT.GG_FAR = GD_REP_FAR) AND (GD_REP_ASP = GC_NUM))
   Move GLB.ZEROS GG_FAR
   Add 1 GG_FAR 
End

The above LDL+ logic needs to be reformatted such that Operand1 starts at column 10 and Operand2 at column 30. We can do this using either of the following two methods:

Method 1 - Using the OperandColumnAbsolute (OCA) option

C:\Program Files\Unisys\NGEN\bin>reeldor –PP –O1C 10 –O2C 30 -OCA -M AModel -S ASegment -L APretty1.log

When the –OperandColumnAbsolute (OCA) option is used for the indented logic it results in the Operand1 and Operand2 columns being placed at the absolute respective positions 10 and 30 respectively.

The resulting reformatted logic of R1.Main after refactoring:

Move     SYSOP.KDVSAPRO     WG_WORK.WG_KDVSAPRO :KDVSAPRO
Abort    GA_SDK
DoWhen ((GG_HEADER_SRV_UIT.GG_FAR = GD_REP_FAR) AND (GD_REP_ASP = GC_NUM))
   Move  GLB.ZEROS          GG_FAR
      Add   1                  GG_FAR 
End

Here the indented logic within the DoWhen block the Operand1 and Operand2 column positions are at absolute positions, 10 and 30 respectively.

Method 2 – Without using the OperandColumnAbsolute (OCA) option

C:\Program Files\Unisys\NGEN\bin>reeldor –PP –O1C 10 –O2C 30 -M AModel -S ASegment -L APretty1.log 

When the –OperandColumnAbsolute (OCA) option is not used for the indented logic it results in the Operand1 and Operand2 columns to be positioned relative to the start column of the command.

The resulting reformatted logic is:

R1.Main logic after refactoring:

Move     SYSOP.KDVSAPRO     WG_WORK.WG_KDVSAPRO :KDVSAPRO
Abort    GA_SDK
DoWhen ((GG_HEADER_SRV_UIT.GG_FAR = GD_REP_FAR) AND (GD_REP_ASP = GC_NUM))
   Move     GLB.ZEROS           GG_FAR
      Add      1                   GG_FAR 
End

Here the indented logic within the DoWhen block the Operand1 and Operand2 column positions are relative to the start position of the command.

Example 3

This example illustrates how to use the ReElDor utility to reformat LDL+ logic using the CA option to force the usage of command abbreviations. This results in the conversion commands to their abbreviated form such as MOVE to MV, DoWhen to DW, etc.

The command line to be used is:

C:\Program Files\Unisys\NGEN\bin>reeldor -PP –CA -M AModel -S ASegment -L APretty2.log 

After its execution, the following summary is displayed in the command line:

Found 4 Elements in Segment ASegment
Pretty R1.Main
Pretty IGLG.Main
Pretty IGLG2.Main
Pretty R2.Main
Total Refactor Time: 0.5 seconds
Validation Time: 0.2 seconds
Total Lines of Logic: 21
Number of Pretty Logics: 4
Total Elapsed Time: 0.8 seconds

The resulting reformatted logic is:

IGLG.Main:

 
MV "X" _PARAM1.DA1                           :Assign value X to incoming parameter
MV "Y" _PARAM101.DA2                         :Assign value Y to incoming parameter

 
IGLG2.Main:

 
MV "X" ABC.DA1                               :Assign value X to incoming parameter
MV "Y" ABC.DA2                               :Assign value Y to incoming parameter

 
R1.Main:


INS IGLG (_PARAM1 = ABC\
 & _PARAM101 = ABC)
MV SYSOP.KDVSAPRO WG_WORK.WG_KDVSAPRO        :KDVSAPRO
MV GLB.REPNAME GD_REPNAME                    :GD_REPNAME
MV GLB.ZEROS GG_HEADER_SRV_UIT.GG_PAR     :GG_PAR
INS IGLG (_PARAM1 = ABC\
 & _PARAM101 = XYZ)
DW ((GG_HEADER_SRV_UIT.GG_FAR = GD_REP_FAR) AND (GD_REP_ASP = GC_NUM))
 

    INS IGLG (_PARAM1 = GRPA.GRPB\
     & _PARAM101 = GRPA.GRPB)
    MV GLB.ZEROS GG_FAR

END
 

R2.Main:

 
INS IGLG2