Hi Dave,

Not enough information.

1. How many records does it run against?
2. How long does it take to run?
3. How massive is the PARMS data?

If 2 above is insignificant, you may be better off to let sleeping dogs lie, rather than having to test against a full EOM run. Otherwise, I vote for a rewrite. Be sure to test, test, test.

Just my 2 pennies,

Charlie Noah
Charles W. Noah Associates
[email protected]

The views and opinions expressed herein are my own (Charlie Noah) and do not necessarily reflect the views, positions or policies of any of my former, current or future employers, employees, clients, friends, enemies or anyone else who might take exception to them.


On 03-02-2011 10:43 AM, Dave Laansma wrote:
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
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to