Binary Load to Create QVD's

    Have you ever had a source file you needed to play with but have not had the QVD's to perform a reload?

     

    No Problem use the script below: -

     

    FOR i=0 TO $(vTableNumber)

     

    LET vTableName =TableName($(i));

     

    TRACE EXPORTING '$(vTableName)';

     

    STORE '$(vTableName)' INTO [$(vTableName).QVD] (QVD);

     

    IF $(i)=0 THEN

      LET vDropString = '[$(vTableName)]';

      ELSE 

      LET vDropString = '[$(vTableName)]'&','&'$(vDropString)';

    ENDIF

     

    NEXT

     

    DROP TABLES $(vDropString);

     

    LET vDropString = NULL();

    LET i = NULL();

    LET vTableName = NULL();

    LET vTableNumber = NULL();

     

    //**************************************************************************************

    //Updated code to allow for spaces in table names per below comments

    //New version is slightly refined with a single loop

    //**************************************************************************************