Author |
Message
|
Ramphart |
Posted: Fri Jul 23, 2004 6:17 am Post subject: Problem parsing a date field |
|
|
 Disciple
Joined: 21 Jul 2004 Posts: 150 Location: South Africa, JHB
|
I'm using WMQI 2.1 CSD 07 on Windows 2000.
Input Data:
Ramo,20040210
Gee,20051223
Work Done:
- Defined a message called Dates with 2 elements, Name as String and DOB as Date.
- Added a Tagged/Delimiter Format Physical layer called TDS
- Set the DOB elements "format" on the TDS tab to YYYYMMDD
When I parse the input data i get the following output:
(0x1000021)MRM = (
(0x1000013)Dates = (
(0x300000B)Name = 'Ramo'
(0x300000B)DOB = TIMESTAMP '1970-01-12 00:00:00'
)
(0x1000013)Dates = (
(0x300000B)Name = 'Gee'
(0x300000B)DOB = TIMESTAMP '1970-01-23 00:00:00'
)
)
Input date 20040212 gets parsed to TIMESTAMP '1970-01-12 00:00:00'
Input date 20051423 gets parsed to TIMESTAMP '1970-01-23 00:00:00'
What do I need to do to parse the incoming dates properly?
Thanks in advance for your response. _________________ Applications Architect |
|
Back to top |
|
 |
kirani |
Posted: Fri Jul 23, 2004 7:20 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
You can specify the date format for MRM element. HAve you tried setting the format to YYYYMMDD? _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
Ramphart |
Posted: Fri Jul 23, 2004 11:28 am Post subject: |
|
|
 Disciple
Joined: 21 Jul 2004 Posts: 150 Location: South Africa, JHB
|
kirani wrote: |
You can specify the date format for MRM element. HAve you tried setting the format to YYYYMMDD? |
I've mentioned in the initial post that the element "format" property is set to YYYYMMDD (found on the TDS tab which has the properties Tag, Length, Justification etc.) of the MRM Message Set so I'm not sure if I understand your question. Am I missing the point?
 _________________ Applications Architect |
|
Back to top |
|
 |
kirani |
Posted: Fri Jul 23, 2004 4:44 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Sorry, I did not read the setting of "format" property for DOB element.
I tested this on my machine (WBIMB 5.0) and it works. However, When I converted the input data from DOB field into XML format, it gave me this output
Code: |
<DOB>1999-09-02</DOB>
|
What version of WBIMB are you using? _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
Ramphart |
Posted: Fri Jul 23, 2004 5:41 pm Post subject: |
|
|
 Disciple
Joined: 21 Jul 2004 Posts: 150 Location: South Africa, JHB
|
I'm using WMQI 2.1 CSD 07 on Windows 2000.
Do you think this is a bug? I've tried it on two different installions of this version on 2000 and got the same result. Very confusing.
Any suggestions? _________________ Applications Architect |
|
Back to top |
|
 |
kirani |
Posted: Fri Jul 23, 2004 8:43 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
This could be a bug.
Unfortunately, I don't have access to WMQI 2.1 right now. I can test this on Monday on WMQI 2.1 CSD4 to see if it works. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
Ramphart |
Posted: Sun Jul 25, 2004 11:21 pm Post subject: Resolved Date Problem |
|
|
 Disciple
Joined: 21 Jul 2004 Posts: 150 Location: South Africa, JHB
|
I've managed to sort this one out. The format string on the TDS layer is in fact CASE SENSITIVE. I've initially set it to YYYYMMDD which gave me really wierd results.
The proper setting is yyyyMMdd.
Thanks for all the responses though  _________________ Applications Architect |
|
Back to top |
|
 |
|