I donot know the syntax for passing parameter to mload.
I am trying to pass two strings as parameter to mload script file and use these string parameters in the script.
something like mload [TableName, SOURCEFILENAME] <Path of sourcefilename.
Here is my scenario:
This is the part of mload script where i want to use the passed string(in INSERT STAMENT below). In TestTable(Teradata table) , there is a column called stream which contains the source file name from which data is loaded into TestTable in Teradata.
In this case the source file name is 'Caliente' which is entered manually in the insert statement below.
There are many source files like these from which i need to extract data from and put the corresponding source file name in Stream column. So as first step i would like to pass the source file name as parameter to mload while calling the file that contains the script.
The other string parameter should be used to specify the source file name in import infile statement. In this case:(see the code below) instead of C:\TD_ETL\ACEESS_ FILES_TEST\TestTable _Caliente.amj i should have C:\TD_ETL\ACEESS_ FILES_TEST\SOURCEFILENAME.amj where SOURCEFILENAME is other parameter passed in the mload.
I am trying to write windows script(not allowed to use shell scripts) to identify total number of source files and run a loop for this number.
I will use something like xxxxx in place of source file name and yyyy in place of the source file name path.
Every time this loop runs, it looks for the mload script file and replaces xxx with the source file name and yyy with source file name path. It then executes the mload script for each loop run.
I am not familiar with the scripting though. i should look for proper syntax to find the number of files in a directory, searching a file, replacing any character in specified file etc. Any suggestions will be appreciated..