copy hashed file

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
deswhk
Participant
Posts: 29
Joined: Mon Sep 03, 2007 7:45 pm

copy hashed file

Post by deswhk »

Can I copy the hashed file directory and its dictionary file in binary mode from one location to another loaction?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Yes, provided that the hardware is compatible (primarily byte order).

For example, copying from a non-Intel chip to an Intel chip would cause difficulties, because every pair of bytes in the hashed file would be in the wrong order.

This can be remedied with the format.conv utility (also known as fnuxi).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
deswhk
Participant
Posts: 29
Joined: Mon Sep 03, 2007 7:45 pm

Post by deswhk »

ray.wurlod wrote:Yes, provided that the hardware is compatible (primarily byte order).

For example, copying from a non-Intel chip to an Intel chip would cause difficulties, because every pair of bytes in the hashed ...
Ok, but after I copied the hashed file cannot be read. It gives me junk characters. This is how I did it.
1) FTP-ed in binary mode from machine 1 to machine 2 the hashed file directory (<hashed file name>) and the dictionary file (D_<hashed file name>)
2) created a pointer to the hashed file directory which contains data.30 and over.30
3) when I view the data of the hashed file in designer mode, it gives me 2 records with some junk characters. Part of the junk characters contain "DATA.30" in the first record and "OVER.30" in the second record.

I am not sure if this is due to the copying or the pointer.
tcj
Premium Member
Premium Member
Posts: 98
Joined: Tue Sep 07, 2004 6:57 pm
Location: QLD, Australia
Contact:

Post by tcj »

Did you copy over the .Type30 file?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You don't have to copy .Type30 - it's empty. But it does need to be there. It signals to DataStage that this directory is a hashed file. Without it DataStage treats it as an ordinary directory, and DATA.30 and OVER.30 as ordinary files, with the results you obtained. Hopefully you have not attempted to make any changes to the "hashed file". A hashed file directoy must contain only DATA.30, OVER.30 and .Type30 files, and must contain all of them. DATA.30 and OVER.30 are not text files; don't try to edit them with text editors.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
deswhk
Participant
Posts: 29
Joined: Mon Sep 03, 2007 7:45 pm

Post by deswhk »

ray.wurlod wrote:You don't have to copy .Type30 - it's empty. But it does need to be there. It signals to DataStage that this directory is a hashed file. Without it DataStage treats it as an ordinary directory, and ...
Where is this .type30 file located? I don't find it in the hashed file directory. I am using a dynamic hashed file.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It has to exist. Look in a "proper" hashed file directory. Note that it has a leading "." and a capital "T". UNIX is case sensitive. The leading "." means that it is a hidden file so you would need the -a option with ls to be able to see that it is there.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
deswhk
Participant
Posts: 29
Joined: Mon Sep 03, 2007 7:45 pm

Post by deswhk »

ray.wurlod wrote:It has to exist. Look in a "proper" hashed file directory. Note that it has a leading "." and a capital "T". UNIX is case sensitive. The leading "." means that it is a hidden file so you would nee ...
You are right. I can view the hashed file after copying over that .type30 file. Thanks! :)
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Time to mark the topic as Resolved then, using the green button at the top of the screen.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply