Page 1 of 1

How to pass coloumn value as a target file name

Posted: Wed Apr 11, 2007 1:21 am
by scorpion
Can someone help me on "how to get the column value in target file name"?

For ex: In my source table

I have a column "Status" The values of that column may vary as

("RJ" or "RL" or "FD")

If staus="RJ" ........................I need to create a sequential file with name "RJ_FOUND.txt" in a folder "Found"

Else if status="RL"............. I need to create a sequential file with name "RL_FOUND.txt" in a folder""Found"

Else if status="RD"............. I need to create a sequential file with name "RD_FOUND.txt" in a folder "Found".


How do I acheive this?


Thanks in advance..

Posted: Wed Apr 11, 2007 2:30 am
by ray.wurlod
Three separate output links from a Transformer, Filter or Switch stage.

Posted: Wed Apr 11, 2007 7:25 am
by DSguru2B
Will the file be empty? You can easily do this with a few lines in a shell script.
psuedocode:
-isolate the column using awk
-grep for the value, if found create the file.