|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
GMTTIMESTAMP precision in Miliseconds |
« View previous topic :: View next topic » |
Author |
Message
|
naio |
Posted: Sun Feb 17, 2013 7:51 pm Post subject: GMTTIMESTAMP precision in Miliseconds |
|
|
Voyager
Joined: 08 Nov 2012 Posts: 82
|
Hello Masters,
I have crash with a wall called GMTTIMESTAMP (Using Broker V7.0.0.4).
I have some events thrown by Broker Nodes with its current time, that time is a Broker time, so It is a GMTTIMESTAMP.
As I transform and handle the event messages, the GMTTIMESTAMP at certain point of my flow is a Character, so I need to calculate some elapsed time with an already tested function and I cast that Strings to GMTTIMESTAMP. That worked fine (in my local environment), the cast is as simple as:
SET TiempoInit = CAST (TIME AS GMTTIMESTAMP FORMAT 'I');
I start testing my Flow on a Server with Windows 2008 Server, and the Precision of miliseconds was incremented from 3 to 6 values, and that is still OK since GMTTIMESTAMP has that amount of precision, but when I efectuate the CAST, is Fails.
The Trace saids:
RecoverableException BIP2488E: ('.MonitorEventDigester_ESQLDigester.Main', '66.4') Error detected whilst executing the SQL statement ''SET TiempoInit = CAST(TRIMBOTH(BOTH FROM Env_Variables.InEvents.Evento[Index].start) AS GMTTIMESTAMP FORMAT 'I');''.
The message broker detected an error whilst executing the given statement. An exception has been thrown to cut short the SQL program.
See the following messages for details of the error.
RecoverableException BIP2521E: ('.MonitorEventDigester_ESQLDigester.Main', '66.21') : Error casting the value '''2013-02-18T03:04:34.484001Z''' to ''GMTTIMESTAMP''.
An error occurred when casting a value to a different data type. This may be because no conversions exist between the two data types or because the particular value was unsuitable.
Subsequent messages will indicate the context of the error.
CastException BIP2319E: Error casting ''Etc/GMT84'' to a timezone. State = '-1' ''S22007'' '0' ''
The given string is not a valid timezone.
Please correct the string and re-issue the cast operation.
So I investigate a bit, and found that maybe it could be since Broker is using GMT and Windows UDT, but am not able to change that from the server, so my actual and POOR solution was to cut the string to:
"2013-02-18T03:04:34.484"
And everithing is working, but I would like to known if that 3 character before the Z are part of the timezone, or are part of Miliseconds precision.
And specially why in my local evironment I did not have them, if everithing in my Windows 7 and in the Windows 2008 server configuration seem the same.
Thanks in advance! _________________ "God is in his heaven all's right with the world" |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Feb 17, 2013 10:56 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Count them as being part of the timestamp.
If part of the timezone you should see something like -02:00 or +02:00 for the timezone.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
rekarm01 |
Posted: Mon Feb 18, 2013 1:16 am Post subject: Re: GMTTIMESTAMP precision in Miliseconds |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
naio wrote: |
SET TiempoInit = CAST (TIME AS GMTTIMESTAMP FORMAT 'I');
... I start testing my Flow on a Server with Windows 2008 Server, and the Precision of miliseconds was incremented from 3 to 6 values, and that is still OK since GMTTIMESTAMP has that amount of precision ... |
Unfortunately, the " FORMAT 'I' " doesn't expect more than 3 digits for fractional seconds, nor does it expect the 'Z' for timezone.
naio wrote: |
I would like to known if that 3 character before the Z are part of the timezone, or are part of Miliseconds precision. |
That all depends on the given format. |
|
Back to top |
|
 |
naio |
Posted: Mon Feb 18, 2013 6:01 am Post subject: |
|
|
Voyager
Joined: 08 Nov 2012 Posts: 82
|
Ok, I undestand what you said concerning the Format (I already trie with IU, T, TU).
But before I Apply the Cast, I already see the date as:
"2013-02-18T16:44:16.920001Z"
And always I have after the last dot "xxx001Z" (where x is a number), so I think that 001Z represent the TIme Zone. _________________ "God is in his heaven all's right with the world" |
|
Back to top |
|
 |
lancelotlinc |
Posted: Mon Feb 18, 2013 6:02 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
naio wrote: |
after the last dot "xxx001Z" (where x is a number), so I think that 001Z represent the TIme Zone. |
No, 'Z' represents the timezone, not '001Z'. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
naio |
Posted: Mon Feb 18, 2013 7:42 am Post subject: |
|
|
Voyager
Joined: 08 Nov 2012 Posts: 82
|
Ok,
I solved it with:
FORMAT 'yyyy-MM-dd''T''HH:mm:ss.SSSSSSZZZ'
Thanks to All! _________________ "God is in his heaven all's right with the world" |
|
Back to top |
|
 |
rekarm01 |
Posted: Mon Feb 18, 2013 10:45 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
naio wrote: |
I solved it with:
Code: |
FORMAT 'yyyy-MM-dd''T''HH:mm:ss.SSSSSSZZZ' |
|
Really? It seems like there ought to be a 'U' in there somewhere:
Code: |
FORMAT 'yyyy-MM-dd''T''HH:mm:ss.SSSSSSZZZU' |
Then 'Z' could represent the timezone. |
|
Back to top |
|
 |
naio |
Posted: Thu Feb 21, 2013 12:36 pm Post subject: |
|
|
Voyager
Joined: 08 Nov 2012 Posts: 82
|
No, with that it Works. However, there is something that I cannot figure Out.
In the same WMB 7.0.0.4 Flow I have several nodes, all of them are producing Event Messages. Sometimes the GTMTIMESTAMP of the event messages arelike:
2013-02-19T15:14:20.079Z
And Other Times are like:
2013-02-19T19:50:35.603001Z
And is stranged that que las values for the Miliseconds are allways '001'.
The Errors with the Formats Are:
Quote: |
2013-02-19 12:14:25.176966 9744 RecoverableException BIP2230E: Error detected whilst processing a message in node 'MonitorEventDigester.ESQL_Digester'.
The message broker detected an error whilst processing a message in node 'MonitorEventDigester.ESQL_Digester'. An exception has been thrown to cut short the processing of the message.
See the following messages for details of the error.
2013-02-19 12:14:25.177086 9744 RecoverableException BIP2488E: ('.MonitorEventDigester_ESQLDigester.Main', '67.4') Error detected whilst executing the SQL statement ''SET TiempoInit = CAST(TRIMBOTH(BOTH FROM Env_Variables.InEvents.Evento[Index].start) AS GMTTIMESTAMP FORMAT 'yyyy-MM-dd'T'HH:mm:ss.SSSSSSZZZ');''.
The message broker detected an error whilst executing the given statement. An exception has been thrown to cut short the SQL program.
See the following messages for details of the error.
2013-02-19 12:14:25.177124 9744 RecoverableException BIP2521E: ('.MonitorEventDigester_ESQLDigester.Main', '67.21') : Error casting the value '''2013-02-19T15:14:20.079Z''' to ''GMTTIMESTAMP''.
An error occurred when casting a value to a different data type. This may be because no conversions exist between the two data types or because the particular value was unsuitable.
Subsequent messages will indicate the context of the error.
2013-02-19 12:14:25.177156 9744 RecoverableException BIP3204S: Input expression ''2013-02-19T15:14:20.079Z'' does not match FORMAT expression ''yyyy-MM-dd'T'HH:mm:ss.SSSSSSZZZ''. Parsing failed to match ''079Z'' with ''SSSSSS''.
The given expression contains data which does not match the current element of the FORMAT expression.
Either rewrite the FORMAT expression to match the input data or modify the input data to match the FORMAT expression.
2013-02-19 12:14:25.177198 9744 UserTrace BIP2539I: Node 'MonitorEventDigester.Trace': Evaluating expression ''Environment'' at ('', '2.3'). This resolved to ''Environment''. The result was ''ROW... Root Element Type=16777216 NameSpace='' Name='Root' Value=NULL''.
2013-02-19 12:14:25.178060 9744 UserTrace BIP2539I: Node 'MonitorEventDigester.Trace': Evaluating expression ''LocalEnvironment'' at ('', '3.3'). This resolved to ''LocalEnvironment''. The result was ''ROW... Root Element Type=16777216 NameSpace='' Name='Root' Value=NULL''.
2013-02-19 12:14:25.178114 9744 UserTrace BIP4060I: Data ''EXPIRE o CATCH ESQL |
Quote: |
.724652 1364 UserTrace BIP4081I: Message propagated to catch terminal from try-catch node 'MonitorEventDigester.Try Catch'.
The try-catch node 'MonitorEventDigester.Try Catch' has caught an exception which occurred in a node connected to its try terminal. The message has been augmented with an exception list and is propagating it to any nodes connected to its catch terminal for further processing. See the following messages for details of the exception list.
No user action required.
2013-02-19 16:50:40.724684 1364 RecoverableException BIP2230E: Error detected whilst processing a message in node 'MonitorEventDigester.ESQL_Digester'.
The message broker detected an error whilst processing a message in node 'MonitorEventDigester.ESQL_Digester'. An exception has been thrown to cut short the processing of the message.
See the following messages for details of the error.
2013-02-19 16:50:40.724712 1364 RecoverableException BIP2488E: ('.MonitorEventDigester_ESQLDigester.Main', '67.4') Error detected whilst executing the SQL statement ''SET TiempoInit = CAST(TRIMBOTH(BOTH FROM Env_Variables.InEvents.Evento[Index].start) AS GMTTIMESTAMP FORMAT 'yyyy-MM-dd'T'HH:mm:ss.SSSZZZ');''.
The message broker detected an error whilst executing the given statement. An exception has been thrown to cut short the SQL program.
See the following messages for details of the error.
2013-02-19 16:50:40.724724 1364 RecoverableException BIP2521E: ('.MonitorEventDigester_ESQLDigester.Main', '67.21') : Error casting the value '''2013-02-19T19:50:35.603001Z''' to ''GMTTIMESTAMP''.
An error occurred when casting a value to a different data type. This may be because no conversions exist between the two data types or because the particular value was unsuitable.
Subsequent messages will indicate the context of the error.
2013-02-19 16:50:40.724752 1364 RecoverableException BIP3204S: Input expression ''2013-02-19T19:50:35.603001Z'' does not match FORMAT expression ''yyyy-MM-dd'T'HH:mm:ss.SSSZZZ''. Parsing failed to match ''001Z'' with ''ZZZ''.
The given expression contains data which does not match the current element of the FORMAT expression.
Either rewrite the FORMAT expression to match the input data or modify the input data to match the FORMAT expression. |
Now I am using and IF to know the length of the GTMTIMESTAMP, but It is strange that I is not always the Same.
Thanks![/quote] _________________ "God is in his heaven all's right with the world" |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|