Hi All,
I have a requirement like this, I have a data file and lookup file
in datafile i have a field called file_name which is lenght of say 50
my reqmnt is to process each record from data-file and see
if any of the record from lookup file has the file_name, then that
record from data-file should be written in output example
data-file:
john
raam
Dev
rita
Lookup file
raajohnxyz
zaadasd
abcrita
asdfasd
my out-file should have below records
john
rita
coz rita john records from data-file are as substring in lookup file
One way of doing this in datastage is reading data-file as input and inside transformer I can call a routine and in that routine I can read look-up
file and return the indicator....let me know if anything better way to do
in datastage...am relatively new to this tool
Mahi
parsing full file for a string
Moderators: chulett, rschirm, roy
-
- Charter Member
- Posts: 42
- Joined: Wed Aug 18, 2004 2:49 pm
-
- Premium Member
- Posts: 108
- Joined: Sat Feb 05, 2005 6:52 pm
- Location: US
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Hashed file only does a whole-key match.
The solution to this can only be a grep for each name on the input stream, given that the "lookup file" is a file. If it's a database table, then a "LIKE" lookup might be possible, but via a Hashed File stage no.
The solution to this can only be a grep for each name on the input stream, given that the "lookup file" is a file. If it's a database table, then a "LIKE" lookup might be possible, but via a Hashed File stage no.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.