Description: Compares factor 1 and factor 2, sets indicators.
Legacy RPG400 Example:
C Value1 COMP Value2 505152
Modern RPGLE Example:
Use a simple set of IF logic conditions:
if Value1 > Value2;
*in50 = *on;
endif;
*in50 = *on;
endif;
if Value1 > Value2;
*in51 = *on;
endif;
*in51 = *on;
endif;
if Value1 = Value2;
*in52 = *on;
endif;
*in52 = *on;
endif;
Or use a SELECT group:
Select;
When Value1 > Value2;
*in50 = *on;
*in50 = *on;
When Value1 < Value2;
*in51 = *on;
*in51 = *on;
When Value1 = Value2;
*in52 = *on;
endif;
*in52 = *on;
endif;
