Getting Eventtype from RT_LOG file
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 42
- Joined: Tue Oct 20, 2009 8:36 am
Getting Eventtype from RT_LOG file
Using a Hashed File Stage it is possible to read alle fields without knowing how they are called. I found a field which I would call something like "eventtype". There are entries like TFCN000001 or TODC000085 in it which classify the messages (seem to be those codes for which message handlers can be created).
How can I get this field from a Universe DB stage (selecting the other fields is no problem, I have all the names)? I need to know the exact column name there but I don't know how to get it...
How can I get this field from a Universe DB stage (selecting the other fields is no problem, I have all the names)? I need to know the exact column name there but I don't know how to get it...
Give this a shot, see if it answers your question:
Code: Select all
LIST.DICT RT_LOG
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 42
- Joined: Tue Oct 20, 2009 8:36 am
Unfortunately it's not listed:
It seems to be some kind of hidden field? However, it's definately there. If you look into the file itself via hex editor you can see the values which are seperated like every other column.
Code: Select all
DICT RT_LOG 18:00:50 01-11-10 Page 1
Type &
Field......... Field. Field........ Conversion.. Column......... Output Depth &
Name.......... Number Definition... Code........ Heading........ Format Assoc..
@ID D 0 RT_LOG 10'0'R S
TYPE D 1 Type 2R S
WAVE.NO D 2 Wave No. 8R S
TIMESTAMP D 3 Timestamp 19L S
MSG.ARGS D 5 Message Args 15L M
MSG.TEXT D 10 Message Text 60T M
FULL.TEXT I SUBR("*DataSt Full Text 60T M
age*DSR_MESSA
GE",@ID,MSG.T
EXT,RAISE(MSG
.ARGS))
SEVERITY I FIELD("Info,W Severity 8L S
arning,Fatal,
Reject,Starte
d,Reset,Error
,Debug",",",T
YPE)
@ PH ID.SUP
Press any key to continue...
DICT RT_LOG 18:00:56 01-11-10 Page 2
Type &
Field......... Field. Field........ Conversion.. Column......... Output Depth &
Name.......... Number Definition... Code........ Heading........ Format Assoc..
SEVERITY
FULL.TEXT
WITH @ID LIKE
'0N' BY @ID
9 records listed.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You need to list the dictionary of YOUR hashed file, not of RT_LOG !
If you know the position of the field in the data record, you can create an entry using that information in the Columns grid of the Hashed File stage, giving as the column name any legal name.
The key column is position 0, the non-key columns are numbered from 1.
If you know the position of the field in the data record, you can create an entry using that information in the Columns grid of the Hashed File stage, giving as the column name any legal name.
The key column is position 0, the non-key columns are numbered from 1.
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: 42
- Joined: Tue Oct 20, 2009 8:36 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
So what do you mean by "Event Type"? The TYPE column contains an enumerated value that maps onto the Type column in Director (and which is displayed as Event Type in detail log view) - is this what you mean?
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: 42
- Joined: Tue Oct 20, 2009 8:36 am
The TYPE column is basically redundant to SEVERITY as SEVERITY is created from it. This is not what I mean.
The kind of "event type" I mean has entries like "TFCN000001" which for example stands for the message that datastage has been started. So it's more or less redundant to the information in the MSG.TEXT column. I think it's a kind of mapping key to a list of messages which shall allow localization or so?
If you look for example here: viewtopic.php?t=100177 (first post) you can also see these "event types" displayed.
The kind of "event type" I mean has entries like "TFCN000001" which for example stands for the message that datastage has been started. So it's more or less redundant to the information in the MSG.TEXT column. I think it's a kind of mapping key to a list of messages which shall allow localization or so?
If you look for example here: viewtopic.php?t=100177 (first post) you can also see these "event types" displayed.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 42
- Joined: Tue Oct 20, 2009 8:36 am
I know that as this mapping between TYPE and SEVERITY is basically in the table definition posted in my second post.
This "event type" (perhaps a bad name? "message code" or so is perhaps better?) would be a lot more detailed than TYPE and allows searching for specific messages. With TYPE you can only search for warnings in general but with this field you could search for example the specific warning about duplicate keys. Sure, you could also achieve this through searching for all matching TYPEs and then doing a full text search but this is not very efficient.
However, if it's not possible I'll have to live with that...
This "event type" (perhaps a bad name? "message code" or so is perhaps better?) would be a lot more detailed than TYPE and allows searching for specific messages. With TYPE you can only search for warnings in general but with this field you could search for example the specific warning about duplicate keys. Sure, you could also achieve this through searching for all matching TYPEs and then doing a full text search but this is not very efficient.
However, if it's not possible I'll have to live with that...
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
OK, fields 4 and 8 both seem to contain the Message ID. Neither of these - as you noted - is mentioned in the file dictionary. However the expression EVAL "@RECORD<4>" can be used in a query to access the contents of field #4. Or use Position 4 in the columns grid of a Hashed File stage.
Last edited by ray.wurlod on Tue Jan 12, 2010 3:33 pm, edited 1 time in total.
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: 42
- Joined: Tue Oct 20, 2009 8:36 am