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
Explore a hash file in a sequential mode
Explore a hash file in a sequential mode
<b>PLEASE READ</b>
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.
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.
Explore a hash file in a sequential mode
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
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
<b>PLEASE READ</b>
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.
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.
Explore a hash file in a sequential mode
I'm prepared to bet you don't know the (physical) structure! :D 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
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
<b>PLEASE READ</b>
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.
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.