Page 1 of 1

HASH File question

Posted: Sun Aug 21, 2005 10:57 pm
by him121
Hi..

I want to read HASH file into Routine..
through TCL command line..

Problem is HASH file having Column name X and values are like 0.000236
when I fired command on DS Admin Command window,,,
SELECT X FROM HASH;

its giving me all the values...like 0.000000.

can any one through some idea..how can i get values stored in HASH file
(less then 1) ...through DS ADMIN Command..

I want to use this syntax into my routine...

regards
Himanshu

Posted: Sun Aug 21, 2005 11:27 pm
by kduke
I think I would change the metadata on that column to a varchar. I would also have the job delete and recreate the hash file so you get a new set of dictionary items.

Posted: Mon Aug 22, 2005 1:36 am
by ArndW
When you use the SELECT and LIST commands in TCL it will read the DICTionary items of the columns that you show and format them according to that item's format clause. You can override that by using the FMT {format} construct on the TCL command line:

So you could write "LIST MYFILE X FMT '12L'" to format column X into 12 characters, left justified.

The alernative is to do an OPEN and READ straight from the routine. The record is read in without any formatting at all.