DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
Author Message
admin
Site Admin



Joined: 12 Jan 2003
Posts: 8720

Points: 10

Post Posted: Tue Feb 24, 2004 1:08 pm Reply with quote    Back to top    

Hi forumers.

I need to read a hash file, following the key and in a sequential order. I
mean, I have to read the entire hash file, and I don't know the keys, but I
know the structure of the file.

How can I do this ?

Thanks in advance.


Guillermo P. Barsky - gbarsky@osde.com.ar
Gerencia de Sistemas - Desarrollo

OSDE Binario - Filial Metropolitana
Alem 1067, Piso 16
TE (5411)4510-4330, Fax (5411)4510-5480
http://www.osde.com.ar

_______________________________________________
datastage-users mailing list
datastage-users@oliver.com
http://www.oliver.com/mailman/listinfo/datastage-users

_________________
PLEASE READ
Do not contact admin unless you have technical support or account questions. Do not send email or Private Messages about discussion topics to ADMIN. Contact the webmaster concerning abusive or offensive posts.
admin
Site Admin



Joined: 12 Jan 2003
Posts: 8720

Points: 10

Post Posted: Wed Feb 25, 2004 2:06 am Reply with quote    Back to top    

Hi Guillermo,

a Hashfile is relativly easy to read with DataStage. If you don't know the
Metadata, you can create artificial ones:

Key1,Key2.....Keyn and
Field1, Field2,....Fieldm

If you have to much it doesn't matter, if you have to less you loose
information.

With the edit-function you can see the data and you are able to set up
meta-Data.

Normaly there is also a D_ or D_ available which
contains the MetaData.

If you make the hashfile available in your project by telneting to the
project and writting

SETFILE /

the metadata also get available in the manager and then it is easy to code a
DataStage-Job.

Wolfgang



-----Original Message-----
From: gbarsky@osde.com.ar [mailto:gbarsky@osde.com.ar]
Sent: Tuesday, February 24, 2004 8:09 PM
To: datastage-users@oliver.com
Subject: Explore a hash file in a sequential mode






Hi forumers.

I need to read a hash file, following the key and in a sequential order. I
mean, I have to read the entire hash file, and I don't know the keys, but I
know the structure of the file.

How can I do this ?

Thanks in advance.


Guillermo P. Barsky - gbarsky@osde.com.ar
Gerencia de Sistemas - Desarrollo

OSDE Binario - Filial Metropolitana
Alem 1067, Piso 16
TE (5411)4510-4330, Fax (5411)4510-5480
http://www.osde.com.ar

_______________________________________________
datastage-users mailing list
datastage-users@oliver.com
http://www.oliver.com/mailman/listinfo/datastage-users
_______________________________________________
datastage-users mailing list
datastage-users@oliver.com
http://www.oliver.com/mailman/listinfo/datastage-users

_________________
PLEASE READ
Do not contact admin unless you have technical support or account questions. Do not send email or Private Messages about discussion topics to ADMIN. Contact the webmaster concerning abusive or offensive posts.
Rate this response:  
Not yet rated
admin
Site Admin



Joined: 12 Jan 2003
Posts: 8720

Points: 10

Post Posted: Wed Feb 25, 2004 1:43 pm Reply with quote    Back to top    

I'm prepared to bet you don't know the (physical) structure! Very Happy However, I assume what you mean is that you know the record structure - that is, the metadata.
You can, of course, read it with a Hashed File stage feeding a stream data link.
In BASIC you open the hashed file, make a Select List of its keys, then read the records one at a time. The record is a dynamic array (text string containing @FM delimiters).
OpenPath hashedfilepath To HF.fvar
Then
Select HF.fvar To 9 ; * use SSelect for sorted by key
Loop
While ReadNext Key From 9
Read Record From HF.fvar, Key
Then
Column1 = Field(Record, @FM, 1, 1)
Column2 = Field(Record, @FM, 2, 1)
:
:
End
Repeat
End
(Error handling monitted for clarity.)
_______________________________________________
datastage-users mailing list
datastage-users@oliver.com
http://www.oliver.com/mailman/listinfo/datastage-users

_________________
PLEASE READ
Do not contact admin unless you have technical support or account questions. Do not send email or Private Messages about discussion topics to ADMIN. Contact the webmaster concerning abusive or offensive posts.
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours