Page 1 of 1

Look up to sequncial file

Posted: Fri Dec 21, 2007 1:39 am
by Das
Hi All

Could you look into the following issues with DS PX.

1. Is it possible to perform the lookup into a sequncial file with out craeting the Dataset (i mean direct lookup to the sequncial).

2.Is it possible to do a self lookup(parimary link as well as the reference link of a sequncial file are same file say emp.txt)?How we can handle this type of situation.

Thanks,
Das"

Posted: Fri Dec 21, 2007 3:41 am
by ray.wurlod
1. If you mean a sparse lookup, no - that's only supported for DB2 and Oracle. If you mean a Sequential File stage feeding a reference link, then yes. The contents of the sequential file are loaded into the virtual Data Set associated with the link. However, if it is too large, this will fail.

2. Yes (see above), but why?

Posted: Fri Dec 21, 2007 4:14 am
by Das
ray.wurlod wrote:1. If you mean a sparse lookup, no - that's only supported for DB2 and Oracle. If you mean a Sequential File stage feeding a reference link, then yes. The contents of the sequential file are loaded ...
Thanks.I am beginer in PX..

I tried to create a reference link as well as a primary link from sequncial file stage both are referencing the same SEQ FILE, it was not possible.
Why?

then i tried to load whole the data from SEQ FILE(abc.txt) to a DATASET (abc.ds) ,[same name src and tgt ] that time it was giving an error," unable to write.."
then i tried to load whole the data from SEQ FILE(abc.txt) to a DATASET (pqr.ds) ,[different name src and tgt ] that time data was loaded successfully
could you tell why?

My requirement is to do a self lookup on a sequncial file Please suggest a solution

Rgds,
Das"

Posted: Fri Dec 21, 2007 5:42 am
by ArndW
Please post the actual error message.

Posted: Fri Dec 21, 2007 7:25 am
by satadru.kar
if you want to do a self lookup with the sequential file, the best way to do it( what I found) is first use the sequential file, followed by a Copy stage from where you should bring out two links, one as primary and other one as a referrence, for the following look up stage... try this option. This should work.

Posted: Fri Dec 21, 2007 7:28 am
by satadru.kar
if you want to do a self lookup with the sequential file, the best way to do it( what I found) is first use the sequential file, followed by a Copy stage from where you should bring out two links, one as primary and other one as a referrence, for the following look up stage... try this option. This should work.

Posted: Fri Dec 21, 2007 7:29 am
by satadru.kar
if you want to do a self lookup with the sequential file, the best way to do it( what I found) is first use the sequential file, followed by a Copy stage from where you should bring out two links, one as primary and other one as a referrence, for the following look up stage... try this option. This should work.

Posted: Fri Dec 21, 2007 12:43 pm
by Minhajuddin
Das wrote: I tried to create a reference link as well as a primary link from sequncial file stage both are referencing the same SEQ FILE, it was not possible.
Why?
Please post your design, as to what you tried e.g. SeqFile-->Lookup....
Das wrote: then i tried to load whole the data from SEQ FILE(abc.txt) to a DATASET (abc.ds) ,[same name src and tgt ] that time it was giving an error," unable to write.."
The first point you need to understand is these two files have different names, How? one is abc.txt and the other is abc.ds alright!

and you don't need a dataset for a reference lookup, you can use the sequential file to do that as well.

To help us really help you, you need to put your error messages in the code tags

Das wrote: then i tried to load whole the data from SEQ FILE(abc.txt) to a DATASET (pqr.ds) ,[different name src and tgt ] that time data was loaded successfully
could you tell why?

Try changing the names back again and see if it works ;)

Posted: Fri Dec 21, 2007 1:29 pm
by ray.wurlod
You can do it from the same sequential file, but not from the same Sequential File stage - you will need two Sequential File stages (one on the stream input the other on the reference input to the Lookup stage) each referring to the same file.