Skip to Content
0
Former Member
Oct 29, 2009 at 09:27 AM

"FOR NEXT" IS NOT WORKING AS INTENTED

12 Views

Hi,

Please look into the below script.

I am having two lgx files "CalcTotValByHub1.lgx" and "CalcTotValByHub2.lgx".

i want to run first file for "APR" month only and the second file for other months from a single package(Must run as a loop from "MAY" to "MAR")

And the package parameters are

Time=2009.APR,2009.MAY,2009.JUN,2009.JUL,2009.AUG,2009.SEP,2009.OCT,2009.NOV,2009.DEC,2009.JAN,2009.FEB,2009.MAR

Category = Budget

Entity = MM

So I have scripted like this. But it is not working as required. The second file too

runs for "APR" month. Actually i don't want it.

*FOR %MONTH%=APR

      *INCLUDE CalcTotValByHub1.lgx

*NEXT

*FOR %MONTH%=MAY,JUN,JUL,AUG,SEP,OCT,NOV,DEC,JAN,FEB,MAR

      *INCLUDE CalcTotValByHub2.lgx

*NEXT

Can anyone please sortout the problem...?

There is any other way?....

Please help me.....

Regards,

Baijuchandran.B