Some additional info:
When I import the hash file's def, I get one field called AT.ID, Varchar length 10. It should be one field, either Timestamp len 19 or Varchar len 19.
Strange data in a manually-created hash file
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You're not doing anything "wrong", per se. It's just that what you're looking at with the text editor is the file header, which contains management information, not data. The data starts later in the hashed file (exactly how much later depends on its tuning parameters).
@ID is the default name for the key in hashed files. AT.ID is a "legal" (starts with an alphabetic character) equivalent.
What you wrote to the hashed file had a sequential number (the variable i) as the key value. This is what you're seeing.
StartDateInt won't appear until you create a file dictionary entry for field number 1. The following command is incomplete, but will suffice:
Then, if you're going to use the data browser, you will need to re-import the "file definition" from the hashed file.
Alternately, you could simply define the second column in your DataStage table definition, and set the Location field in the Sequential File stage to 1 (and the Type field to "S").
@ID is the default name for the key in hashed files. AT.ID is a "legal" (starts with an alphabetic character) equivalent.
What you wrote to the hashed file had a sequential number (the variable i) as the key value. This is what you're seeing.
StartDateInt won't appear until you create a file dictionary entry for field number 1. The following command is incomplete, but will suffice:
Code: Select all
INSERT INTO DICT DimDate(@ID, F1, LOC, FORMAT) VALUES ('StartDateInt', 'D', '1', '19L');
Alternately, you could simply define the second column in your DataStage table definition, and set the Location field in the Sequential File stage to 1 (and the Type field to "S").
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 81
- Joined: Wed Jul 14, 2004 3:18 am
- Location: Johannesburg, South Africa
- Contact:
Thanks! I had to make two corrections to Ray's code:
It is, of course, the actual hash file name (DimDateHash) that is used and not the routine's file handle (DimDate).
LOC is a number and not a string so it's 1 and not '1'.
Does anybody know where one would typically find some documentation on working with the UniVerse dictionary? I couldn't really find anything in the DataStage online documentation.
Code: Select all
INSERT INTO DICT DimDateHash(@ID, F1, LOC, FORMAT) VALUES ('DateID', 'D', 1, '19L');
LOC is a number and not a string so it's 1 and not '1'.
Does anybody know where one would typically find some documentation on working with the UniVerse dictionary? I couldn't really find anything in the DataStage online documentation.
Morney le Roux
There are only 10 kinds of people: Those who understand binary and those who don't.
There are only 10 kinds of people: Those who understand binary and those who don't.
Hi,
Pls search the forum. This has already been discusssed.
Pls follow the following link
viewtopic.php?t=88327
HTH
--Rich
Pls search the forum. This has already been discusssed.
Pls follow the following link
viewtopic.php?t=88327
HTH
--Rich
Here are a couple quick commands to see what the fields are in hash file and to see what the fields are in the DICT.
F1 should be a VARCHAR. Other fields are CONV or F3 for the conversion. F4 or NAME is the column heading. F5 or FORMAT is the length and justification like 15L. F6 or SM is whether it is "S" single or "M" multivalued.
Ray, this is a nice way to create dictionary items. I think I will modify my create DDL routine to generate these INSERT statements.
Code: Select all
LIST DICT DateDimHash
Code: Select all
LIST DICT.DICT
Ray, this is a nice way to create dictionary items. I think I will modify my create DDL routine to generate these INSERT statements.
Mamu Kim