How to ensure a hash file is 64bits.

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
holymac
Participant
Posts: 25
Joined: Sun Jan 08, 2006 9:40 pm

How to ensure a hash file is 64bits.

Post by holymac »

Dear All,
How or what command can i use to check whether a hash file is 64bits or not.

Thanks in advance.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Search the forum. How you do this depends on whether a VOC pointer exists to the hashed 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.
holymac
Participant
Posts: 25
Joined: Sun Jan 08, 2006 9:40 pm

Post by holymac »

Ray i already created a pointer entry into VOC and executed the following command "UVFIXFILE hash_filename VLEVEL 0 TRACE 1" but the command screen was blank with the close button activated.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Try

Code: Select all

SH -c "od -x hashedfile/DATA.30 | head -1" 
as your command. Examine the first four bytes.
If they show acef 010c (or 010c acef on an Intel CPU), then it is a 32-bit hashed file.
If they show acef 020c (or 020c acef on an Intel CPU), then it is a 64-bit hashed file.
For static hashed files, omit the "/DATA.30" from the hashed file pathname.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
holymac
Participant
Posts: 25
Joined: Sun Jan 08, 2006 9:40 pm

Post by holymac »

Dear Ray,

I am not a premium poster so unable to read your full reply but was able to capture the command.Here what i did:

i. mkdbfile /crdrsk/data/HASH/PRV_MTH_ST_TEST 30 1 4 20 50 80 1639 -
64bit - The file was created successfully.
ii. executed SH -c "od -x /crdrsk/data/HASH/PRV_MTH_ST_TEST/DATA.30 | head -1" command.

Output was - This was supposed to be a 64bits.
0000000 acef 010c 0000 001e 0000 0000 0000 0001

I ran the command against a different hash file which was not changed to 64 and the output was still the same as above.

Where i went wrong?

Thanks
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Here is the part you missed:
If they show acef 010c (or 010c acef on an Intel CPU), then it is a 32-bit hashed file.
If they show acef 020c (or 020c acef on an Intel CPU), then it is a 64-bit hashed file.
For static hashed files, omit the "/DATA.30" from the hashed file pathname.

So maybe both hashed files are 32 bit.
Mamu Kim
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Your hashed file was created successfully but not as a 64-bit hashed file. I don't know why; your mkdbfile command looks OK. Can you perhaps try it with the -64BIT option in upper case? How did you execute the mkdbfile command? For example, was it through ExecSH?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
holymac
Participant
Posts: 25
Joined: Sun Jan 08, 2006 9:40 pm

Post by holymac »

Dear Ray and Duke,

Indeed the "BIT" must be in upper case. That solved the issue.


Thank you very much.
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

Good to know.
Mamu Kim
holymac
Participant
Posts: 25
Joined: Sun Jan 08, 2006 9:40 pm

Post by holymac »

Thank you everyone for the inputs. Learned something new through this post. Appreciate it.

Have a nice day.
Post Reply