11 Replies Latest reply: Jun 27, 2011 10:42 AM by Miguel Angel Baeyens de Arce RSS

    Help with using a parameter in Load Script

      Hi guys,

       

      I have an application that runs weekly and I am trying to automate qvd creations and reloads.

       

      My scenario:

       

      I have weekly text file that are run over the weekend and are stored as text files. My file names will always be of the form FileName_DDMMMYYYY for every week. For example week 1 will be 03Jun2011, week 2 will be 10Jun2011, week 3 will be 17Jun2011.

       

      Is there a way to create some kind of dynamic variable in my load script to cater for this changing weekly date value, so that I do not have to hardcode my script always.

       

      At the moment I have come up with

       

      let weekdate = date(today() -2, 'DDMMMYYYY');

       

      let week1 = 'FileName_$(weekdate)';

       

      let j=1;

       

      TableName:

       

      Load ........

       

      From [D:\Directory\$(week$(j)).csv]

      (txt, codepage is 1252, embedded labels, delimiter is ',', msq);

       

      The solution I have is not flexible enough and will only work if I run my automation piece on a monday but not on any other day as the dates change making the file name wrong.

       

      Can someone please help me out to get this working? Thanks