1 Reply Latest reply: Jun 7, 2018 3:09 PM by Rohit Kumar RSS

    Nest For loop not working

    Rohit Kumar

      Hi Techies,

       

      I am using nested loop, where two are my for loop and one is Do while, It only executes once, then second time it get fails and give me me error as The control statement is not correctly matched with its corresponding start statement

                     Next a

       

      Temp_0:

      load

      *

      Inline

      [

      FIELD_CATEGORY

      ABC/

      CDE/

      EFG/

      ](delimiter is '/');

       

       

      Let c=1;

      FOR c = 1 to  NoOfRows('Temp_0')-1

       

      TEMP:

      Load

      *

      inline

      [

      FIELD

      ABC

      DEF

      GHI

      ];

       

      let a=1;

      FOR a = 1 to NoOfRows('TEMP')-1

      let Var=FieldValue('FIELD',$(a));

      let vCountry = SubField(Var,'|',2);

       

       

      ////////Weekly Loop///////

      let vToday = num(now())-14;

      let b= '42442';

      Do while b <= vToday

      let vmessage='';

       

      let b=b+7;

      Loop

      NEXT a

      Next c

       

      what I am trying to do, my code first take value from first inline table , then take value from second inline table and then run the weekly loop from a certain date and same repeat for other values from inline table