read hash file from unix

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
ysrinu
Participant
Posts: 18
Joined: Fri Aug 24, 2007 4:46 pm

read hash file from unix

Post by ysrinu »

Hi,
how can i read hash file using shell scripts, without writing any new ds routines?

Thanks,
-srinivas yelamanchili
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

There is no utility to directly read hashed files from UNIX. You would need to invoke the dssh to get into the DataStage command environment, and then issue the appropriate LIST or SELECT clause. In a simplified form, you can attach to the correct project directory and issue something like

Code: Select all

dssh "COUNT VOC"
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

OK here's the deal.

A hashed file (note: it's not a "hash" file) is a "UniVerse" database table.

So, you tell me how to read, say, an Oracle table from UNIX and I'll respond with how to read a UniVerse table from UNIX.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
arjun_004
Participant
Posts: 12
Joined: Wed Feb 07, 2007 2:10 am
Location: Mumbai
Contact:

Post by arjun_004 »

Hi Ray,

I am not sure about how to read the oracle table from the shell scripts
but in the teradata we can write the bteq command in the shell scripts or we can call the bteq scripts.


Now kindly let us know how to read the hash file in unix.

ray.wurlod wrote:OK here's the deal.

A hashed file (note: it's not a "hash" file) is a "UniVerse" database table.

So, you tell me how to read, say, an Oracle table from UNIX and I'll respond with how to read a UniVerse table from UNIX.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Very good.

For UniVerse, you use a dssh command or script.

The simplest of these will contain just the SELECT statement you require.

Code: Select all

$DSHOME/bin/dssh "SELECT NAME, JOBNO FROM DS_JOBS WHERE NAME NOT LIKE '\\%';
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply