This is some old code that I didn't write, so please don't use it for anything profitable ...
The proposal to the group is: Due to the repeated references deep into the PARMS tables, if this were rewritten to reference these locations as few times as possible, IN YOUR OPINION, would there be a significant improvement in the performance of this subroutine? All in favor of rewrite, say AYE All opposed, say NAY (I'm testing some U2UG-Denver skills) MONTHLY.USAGE: CM=MONTH+LY.CNT FOR M=1 TO 12 IF PARMS(12)<101,CM>#'' OR PARMS(12)<133,CM>#'' OR PARMS(12)<134,CM>#'' THEN CUM(M)=PARMS(12)<101,CM>+PARMS(12)<133,CM>+PARMS(12)<134,CM> END IF PARMS(7)<100,CM>#'' OR PARMS(7)<101,CM>#'' OR PARMS(7)<102,CM>#'' THEN IF PARMS(7)<100,CM>#'' THEN CUMO(M)=CUMO(M)+PARMS(7)<100,CM> ELSE CUMO(M)=CUMO(M)+PARMS(12)<101,CM> END IF PARMS(7)<101,CM>#'' THEN CUMO(M)=CUMO(M)+PARMS(7)<101,CM> ELSE CUMO(M)=CUMO(M)+PARMS(12)<133,CM> END IF PARMS(7)<102,CM>#'' THEN CUMO(M)=CUMO(M)+PARMS(7)<102,CM> ELSE CUMO(M)=CUMO(M)+PARMS(12)<134,CM> END END CM=CM-1; IF CM=0 THEN CM=24 NEXT M RETURN _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users