LOAD DATA INFILE '/XXINSTANCEXX/applmgr/CUSTOM/xbol/12.0.0/bin/XX_DATA.csv'
REPLACE INTO TABLE XX_STAGING_TABLE
FIELDS TERMINATED BY ","
TRAILING NULLCOLS
This is part of my CTL used in my concurrent program. I need to update the INFILE with every run. I will be aware of the path but i need to change the file name in this example XX_DATA.csv to something else.
Let us assume that we are going to have a particular pattern for the CSV file which I am going to get. So if the file arrives on 9th of April 2015 it will be named as NEWFILE09042015 and a file arriving next day will have the file name of NEWFILE10042015 , a day after NEWFILE11042015 and so on. So we are effectively aware of the file name that we will get but need to find a way by which I can update the same in my CTL file.
How can I achieve this ?