Skip to Content
0
Former Member
Jun 30, 2011 at 01:11 PM

FOR/NEXT error

14 Views

Hi,

I'm trying to create a FOR/NEXT script, but it continue to fail. The validation is passed, but when sending data to the database (using default logic) I for period 2 and 3 (Feb and March) receive an error:

Error running default logic
Error converting records: Root element is missing

Normally I would expect default logic not to be validated, but since I can send data and active the script for JAN I would say everything is OK.

The script I'm running is:

*WHEN ACCOUNT
  *IS "QSOLD"
   *WHEN TIME.PERIOD
      *IS "JAN"
         *FOR %PER% = 0,1,2,3,4,5,6,7,8,9,10,11
              *REC(EXPRESSION=%VALUE%, TIME=TMVL(%PER%,%TIME_SET%),ACCOUNT="INVSALE")
         *NEXT

      *IS "FEB"
         *FOR %PER% = 0,1,2,3,4,5,6,7,8,9,10
              *REC(EXPRESSION=%VALUE%, TIME=TMVL(%PER%,%TIME_SET%),ACCOUNT="INVSALE")
         *NEXT
  *ENDWHEN
*ENDWHEN

The strange thing is: when I send data in March, the script also fails, even though the period is not in scope for the WHEN/ENDWHEN.

Can anyone see my problem and help me in the right direction?

BR

Lars