Conditional Continue-statement

Created on Nov. 29, 2023, 1:52 p.m. - by Hans, Van Battel


In batch-processing of big datasets every speed-up is important, so Is there any difference in the execution-speed between:

     IF a = b
          continue
     ELSE
          MOVE b to a
     END-IF

and:

     IF a <> b
          MOVE b to a
     END-IF


Comments (1)

Jon, Butler
Feb. 12, 2024, 6:26 p.m.

While they appear inocuous, the first form (a=b) will have to generate several NOP (no operation) instructions and then a MOVE.

Some people are very much against using a "not ="...which is the COBOL expression, not the SQL "<>", but in any case the compiler generates extra instructions for the first form that are not required for the second.  Stick with the NOT EQUAL.


Copyright 2020 by ibmmainframer. All Rights Reserved.