Page 1 of 1

SourceFile name as my Domain(Key)

Posted: Wed Feb 11, 2004 3:23 pm
by chou
Hi All,

I have a problem, I have to pick a flat file which resides in Unix ...Extract_dir Directory. i have to use the file name as my Domain name which is a key in my hash file. there are like 30files in a month or more. ex.. filename -- www.adhdinfo.com_sem_20031029.txt and in my hash file property_domain as Key which i have to reffer to file name.
filename2 www.elidel.com_smi_20031029.txt. so i have to pick this file name to my property_domain. like this i have more than 30 files.

please help me out.

Thanks,
chou

Posted: Thu Feb 12, 2004 2:59 am
by roy
Hi,
First Welcome aboard :).
unfortunatly I'm not sure I undestand your question, so can you explain it as simple as you can?
what exactly do you need your output to be or what do you want to do with it?

Posted: Thu Feb 12, 2004 8:30 am
by chou
thanks Roy,

we have flat files in Unix Dir, which are my source files. I have a Hash file in that i have a Key Property_Domain, which i have to take the source file name as Property_Domain. there are like 30+ source files with diffrent names. these files will come every month.

my question is, how to pick the particular file from unix dir and the source file mane as my Property_domain(KEY in Hash File) which refers and to get the Property_Key to target.

I am not very good explainer. i guess it is some what clear than earlier.

Eg... if i pick the file name www.adhdinfo.com_(datestamp).txt then my property_domain is www.adhdinfo.com. it checks the Hash to get the Property_Key to Target.

Eg..2 If i pick www.elidel.com_(datestamp).txt then Property_Domain is www.elidel.com.......

Thanks

Posted: Thu Feb 12, 2004 11:00 am
by chulett
You might want to check out this post which details one or two ways to accomplish what you are looking to do.

Posted: Thu Feb 12, 2004 3:30 pm
by ray.wurlod
You can get the file names with a Folder stage, or in Job Control code.

You can extract everything to the left of the first underscore using the Field() function. For example:

Code: Select all

Field(filename, "_", 1, 1)
In job control code, you would open the directory as if it were a table (using OpenPath), generate a Select List of the entrynames in the directory, and process that list.