Look up to sequncial file
Moderators: chulett, rschirm, roy
Look up to sequncial file
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"
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"
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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?
2. Yes (see above), but why?
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.
Thanks.I am beginer in PX..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 ...
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"
Please post the actual error message.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 14
- Joined: Fri Dec 22, 2006 5:40 am
- Location: Kolkata
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.
Thanks,
Satadru Kar
Satadru Kar
-
- Participant
- Posts: 14
- Joined: Fri Dec 22, 2006 5:40 am
- Location: Kolkata
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.
Thanks,
Satadru Kar
Satadru Kar
-
- Participant
- Posts: 14
- Joined: Fri Dec 22, 2006 5:40 am
- Location: Kolkata
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.
Thanks,
Satadru Kar
Satadru Kar
-
- Participant
- Posts: 467
- Joined: Tue Mar 20, 2007 6:36 am
- Location: Chennai
- Contact:
Please post your design, as to what you tried e.g. SeqFile-->Lookup....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?
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!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.."
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
Minhajuddin
<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
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.