3 Replies Latest reply: Jan 14, 2017 11:16 PM by Chip Matejowsky RSS

    'Script failed' but doesn't seem to be

    James Hanify

      I have tried going through the debug and it seems to successfully do its thing.


      It just always seems to fail on the store of the qvd


      I have tried different things but to no avail.


      Path for save path


      // sets path for saving
      SET vPathQvd = '..\Data\TestQVDs';
      Directory [$(vPathQvd)];



      This is my script ending

      // Begin process to end the script
      DisConnect; //disconnect gracefully from ODBC? No further ODBC connections can be deployed after this line
      // To store data into QVDs to be used by the user interface later and be more efficient
      for i = 0 to NoOfTables() - 1
        LET d = TableName(i);
        //store $(d) into $(vPathQvd)\$(d).QVD;
        store $(d) into $(d).QVD;
      // To find out the how long the script took
      LET vScriptDuration = interval(now() - $(vScriptStartTime),'mm:ss');
      // Allow a graceful exit
      exit Script;


      When I comment out the whole store part, it doesn't say script failed but then it obviously hasn't stored it, which makes me think it is a permissions problem?


      Any help / advice would be appreciated

        • Re: 'Script failed' but doesn't seem to be
          Girirajsinh Vaghela



          Could you share .qvw or part of it ?


          One thing to check is $(d) is not Null. .. Check  what TableName(i) carries . You may use TRACE command to know it values.

          • Re: 'Script failed' but doesn't seem to be
            Girirajsinh Vaghela

            HI James,


            Following is working for me. It saves each table into separate qvd


            SET vPathQvd = 'D:\Girirajsinh'; 
            Directory [$(vPathQvd)]


            for i = 0 to NoOfTables() - 1 
            LET d = TableName(i); 
            store $(d) into $(d).QVD; 

            //LET vScriptDuration = interval(now() - $(vScriptStartTime),'mm:ss'); 
            exit Script

            • Re: 'Script failed' but doesn't seem to be
              Chip Matejowsky

              Hi James,

              In my past experience, I have run across some similar issues as yours regarding tasks failing if a STORE to QVD is invoked in the load script., especially if the STORE command and is called near the end of the load script. Something you may want to try would be to create a temporary auto-generated table immediately after the STORE command as the OS needs time to process file operations associated with the STORE command before moving on with the load script. An additional troubleshooting step you may implement would be to auto-generate a temporary table after the STORE command. This should allow enough time for the file operations to compete.


              You could have the QVW developer include something similar to the below after the STORE command:

              Load RecNo( ) as A, rand( ) as B autogenerate(100000);(Note: The parenthesis after autogenerate is allowed but not required.)

              Hope this helps