Page 1 of 1

Analyzing a hash file

Posted: Wed May 19, 2004 12:16 am
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.

Posted: Wed May 19, 2004 12:33 am
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,

Posted: Wed May 19, 2004 1:24 am
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.

Posted: Wed May 19, 2004 2:08 am
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.

Posted: Wed May 19, 2004 4:45 am
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.