Analyzing a hash 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
nilotpalr
Participant
Posts: 29
Joined: Tue Dec 10, 2002 2:54 am

Analyzing a hash file

Post by nilotpalr »

Hi All,
Where do I run the ANALYZE.FILE or HASH.HELP commands to analyze a hash file.
I tried running at the - C:\Ascential\DataStage\Engine\bin prompt but it failed.
Please assist

Thanks in advance,
Nilotpal.
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
theese commands can be run in several ways:
1. from administrator via the command window.
2. from DS basic code using the DSExecute routine with TCL or execTCL.
3. from command line, after loading the dsenv being int the engine directory and runing bin/uv, then use LOGTO <project name>; now your in the project and can issue those commands.

bare in mind that when is the 3rd option you are in the universe command lind (CTL+C then Q will get you out of there and you can harm your project if you don't know what your doing).

(p.s. my "syntax" may be flawed since I don't have access to DS when posting this)
IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It depends on whether you created your hashed file in a project (=account) or in a directory.

If they're in a project, you can execute the commands from the TCL prompt ( > ).

If they're in a directory, you'll need to include the DataStage Engine bin directory in your PATH environment variable, so that the executables can be found. The executable for HASH.HELP is hash.help. ANALYZE.FILE is trickier; it uses the file.stat executable but not directly.
An alternative is to use SETFILE to create a pointer to the hashed file in question then use ANALYZE.FILE from the TCL prompt.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
nilotpalr
Participant
Posts: 29
Joined: Tue Dec 10, 2002 2:54 am

Post by nilotpalr »

roy wrote:Hi,
theese commands can be run in several ways:
1. from administrator via the command window.
2. from DS basic code using the DSExecute routine with TCL or execTCL.
3. from command line, after loading the dsenv being int the engine directory and runing bin/uv, then use LOGTO <project name>; now your in the project and can issue those commands.

bare in mind that when is the 3rd option you are in the universe command lind (CTL+C then Q will get you out of there and you can harm your project if you don't know what your doing).

(p.s. my "syntax" may be flawed since I don't have access to DS when posting this)
IHTH,
Hi Roy,
I tried running the same. I looged into the project and issued the following command:
ANALYZE.File C:\Filename
it gave me the following error:
Unmatched Quotation mark.

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

Post by ray.wurlod »

When you're at the TCL prompt you must refer to the hashed file name by its name in the project's vocabulary. Usually this is the same as the entry name - that is, the name of the file in its directory.

So, for example, if your hashed file is called Customers and it is in the C:\HashedFiles directory, the first thing you need to do is to add an entry to the project's vocabulary indicating that the word "Customers" is the name of a hashed file, and supplying the location of that hashed file. This is accomplished with the SETFILE command.

Code: Select all

SETFILE C:\HashedFiles\Customers Customers OVERWRITING
You can now refer to the hashed file through this name. For example:

Code: Select all

ANALYZE.FILE Customers STATS
Note that all names in the project's vocabulary are case sensitive.
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