Description: Compares factor 1 and 2, branches to tag if condition (xx = EQ, GT, etc.) is true.
Legacy RPG400 Example:
Compare Value1 to Value2 and if they are EQUAL branch (aka GOTO) to the LABEL
Compare Value1 to Value2 and if Value1 is GREATER than Value2 branch (aka GOTO) to the LABEL
Compare Value1 to Value2 and if Value1 is LESS than Value2 branch (aka GOTO) to the LABEL
Modern RPGLE Example:
There is no equivalent of Compare and Branch because this spaghetti loop style of coding has been deprecated in favour of a neat and more organised style. Perhaps consider putting the code in a subroutine and executing it something like this:
exsr Subroutine;
endif;
exsr Subroutine;
endif;
exsr Subroutine;
endif;
