9 Replies Latest reply: Jun 11, 2018 3:06 AM by Marcus Sommer RSS

    Exit Script not working

    Rohit Kumar

      Hi Techies,

       

      I have written one application which has three nested loops, two FOR loop and one DO WHILE then exit script and there are another tabs which have some old code. I executed below code two or three times in my script is was executed fine.

       

      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

      exit script

      //old code//

       

       

      but suddenly it was started through error which is :

      The control statement is not correctly matched with its corresponding start statement

                     Next a



      Then I deleted the tables after EXIT SCRIPT and script is started running fine.

       

      My problem is why script is not working if there is old code after exit script ?

       

      Thanks in Advance!

       

      Rohit