Hi friends,
I have a file "xyz02182004", which come every month(i.e monthly). I have to design a job which will run monthly. I took a file stage on this file and started validation on this file using a transformation. The problem is this file name gonna change next month but the validation process gonna be same. The file name are been suffixed by the date but the initially name or the patten remains fixed like xyz.
Can i write the file path as "\app\dump\monthly\xyz*.txt" and every time when a job is run it reads xyz02182004 file.
Thanks
File Stage
Moderators: chulett, rschirm, roy
Just setup a symbolic link to point to the appropriately named file. This allows your job to have a fixed name, and the symbolic link switches between files. An alternative is to copy the landed file into a processing directory under the fixed name.
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
What is a symbolic link (is it another stage) how do i do thatkcbland wrote:Just setup a symbolic link to point to the appropriately named file. This allows your job to have a fixed name, and the symbolic link switches between files. An alternative is to copy the landed file into a processing directory under the fixed name.
Just pitching in. A symbolic link is a file that is "pointer" to the original file in UNIX. You make it (in UNIX, not in DataStage) with:vzmz wrote:What is a symbolic link (is it another stage) how do i do thatkcbland wrote:Just setup a symbolic link to point to the appropriately named file. This allows your job to have a fixed name, and the symbolic link switches between files. An alternative is to copy the landed file into a processing directory under the fixed name.
Code: Select all
ln -s original_file link_name
The scanning of a directory we normally do via a UNIX script which then runs dsjob passing the name of the file to the controlling job, ...
Ogmios
ogmios is correct in the explanation of a symbolic link. If you have a directory like:vzmz wrote:What is a symbolic link (is it another stage) how do i do thatkcbland wrote:Just setup a symbolic link to point to the appropriately named file. This allows your job to have a fixed name, and the symbolic link switches between files. An alternative is to copy the landed file into a processing directory under the fixed name.
Code: Select all
/tmp/file_1
/tmp/file_2
/tmp/file_3
/tmp/file_4
Code: Select all
ln -s /tmp/file_1 /wherever/fred
Code: Select all
rm /wherever/fred
ln -s /tmp/file_2 /wherever/fred
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle