3 Replies Latest reply: Apr 25, 2014 2:29 PM by LEWIS GOLDSTEIN RSS

    MUST_INCLUDE in Subroutine getting invoked prior to Subroutine being called

      My script has a subroutine that contains a MUST_INCLUDE statement.

       

      SUB GET_SOME_STUFF (box)
          
      LET my_include= '..\..\Include\odbc-' & '$(box)' & '.qvs';
          
      $(Must_Include=$(my_include));

            ......

            ......
      END SUB;

       

      LOAD BOXName
               ,
      BOXType
         FROM [..\..\QVD\SYSTEM_INFO.qvd](qvd);

      LET vNumBoxes=NoOfRows('BOX');
      FOR i1=0 to $(vNumBoxes)-1
         
      LET vBox=Peek('BOXName',$(i1),'BOX');
         
      LET vVolCnt=peek('VOLCnt',$(i1),'BOX');
         
      CALL GET_SOME_STUFF (vBox); 
      NEXT

       

       

      Prior to first call to subroutine the MUST_INCLUDE is getting invoked even though the subroutine has not been executed as of yet.  I can get around this problem by using INCLUDE instead of MUST_INCLUDE making the error silent, but find it odd that the statement is getting invoked at all prior to being called.  I would prefer to continue to use the MUST_INCLUDE as it insures my Include files exist.  Hoping someone else has run into this and has some suggestions.