|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Default Values for Physical Type Integer(2) |
« View previous topic :: View next topic » |
Author |
Message
|
LearnMQSI |
Posted: Mon Apr 24, 2006 6:21 am Post subject: Default Values for Physical Type Integer(2) |
|
|
 Centurion
Joined: 20 Aug 2002 Posts: 137
|
Hi There,
My Env.
WMQ - 5.3
MQSI - 2.1
AIX - 5.1
I have a field whose Physical Type is Integer, Length Count = 2.
I have a situation that in my input XML message I'm providing value of 9999 in this field and it is mapping properly but it is a repeating field and it has to repeat 350 times. I'm providing value in this field only first time and from second time onwards I want it to be filled it from my message set default value which I have set it to four zeroes i.e. 0000.
Here is my mapping ESQL code: (XML-to-MRM)
SET I = 1;
WHILE I <= 350 DO
SET "OutputRoot"."MRM"."MQ_PREV_VERSIONS"[I]."MQ_PREV_CVG_SEQ_NUM" =
CAST(ref1."PreviousVersions"."PreviousCoverageSeqNum" AS INTEGER CCSID InputRoot.Properties.CodedCharSetId Encoding InputRoot.Properties.Encoding);
SET I = I + 1;
END WHILE;
Here is the Output showing in IH03:
10 179 2 INT 1 MQ-PREV-CVG-SEQ-NUM 270F (which is good, first time iteration)
From next iteration, it is generating wrong output as follows:
10 186 2 INT 2 MQ-PREV-CVG-SEQ-NUM 00BC (In decimal it is equla to 188, which is wrong, I'm expecting four zeroes i.e. 0000 here)
Please help me here.
I'm wondering if my default values are wrong. I also like to know the default values for:
1. Physical Type Integer(4) i.e. Length Count = 4
2. Physical Type Packed Decimal(3 and 4) i.e. Length Count = 3 and 4
3. Physical Type String 10 (I guess this is fairly easy)
Thank in advance for all your help!!! _________________ IBM Certified System Administrator - WebSphere MQ 5.3 |
|
Back to top |
|
 |
kimbert |
Posted: Mon Apr 24, 2006 12:45 pm Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Hi LearnMQSI,
Sorry to say this, but you need to learn how to use the product. You are making some very basic mistakes here - so basic that it's hard to know where to start. I suggest that you get some training.
Quote: |
I want it to be filled it from my message set default value which I have set it to four zeroes i.e. 0000. |
Why not just a single zero? A default value is a logical value, so four zeros means exactly the same as one zero.
Quote: |
Here is my mapping ESQL code: (XML-to-MRM) |
I think you must have posted the wrong ESQL. That loop is setting all 350 output values to the same input value.
Why are you doing a CAST to obtain the integer value? You should model that field as an integer, so that it appears in the tree as an integer. ( I'm assuming that you are using the MRM domain for parsing the input XML)
Why are you using CCSID and Encoding in the CAST statement? All values in the message tree are in Unicode ( code page 1200 ). This may be one reason for the strange values in your output message. |
|
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
|
|
|
|