ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » PIC S9(4) COMP Fields

Post new topic  Reply to topic Goto page Previous  1, 2, 3
 PIC S9(4) COMP Fields « View previous topic :: View next topic » 
Author Message
LearnMQSI
PostPosted: Fri Mar 17, 2006 12:07 pm    Post subject: Reply with quote

Centurion

Joined: 20 Aug 2002
Posts: 137

Hi EddieA,

Here is how I'm testing, right now, I'm performing unit testing i.e.

XML-to-MRM Message Flow
1. I have generate my xml request message using xmlspy
2. put the value by just typing in a tag called <Fld1>976400000</Fld1>
same as all other fields
3. I put this xml message in my input queue
4. My message flow generates MRM output and goes to another local q on
the same q mgr (System Env. is AIX 5.1.0.0, WMQ 530.6 CSD06)
5. Looking at the generated MRM message using IH03 using both i.e. data
and its Hex value

MRM-to-XML Message Flow (Still on the same Q Mgr)
1. Put the generated MRM message into input local queue
2. My message flow generates XML output and put it to another local queue on the same q mgr.
3. Looking at the generated XML message using IH03 again using both option.

Having said this, I did another testing by sending generated MRM message to mainframe. I used browse utility on mainframe to browse the message using HEX option. Still the same output.

NOTE: My sender channel does set CONVERT(YES) option.

Am I doing something wrong here, your input and help would be real help to my issue.

Thank you again!!!
_________________
IBM Certified System Administrator - WebSphere MQ 5.3
Back to top
View user's profile Send private message
EddieA
PostPosted: Fri Mar 17, 2006 6:51 pm    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Quote:
NOTE: My sender channel does set CONVERT(YES) option.

Ack. If this is for the MRM message, then unless you have written your our message conversion exit, this will NOT work. MQ can natively only convert messages described as MQSTR, and the data can only be character.

Start drawing "pictures" of the flows, and start including actual cut/pastes of both the input to, and output from the flows (noting what the CCSID and Encoding is at each point), and traces within the flow, before and after the conversions. That way we can see exactly what is where instead of trying to read "between the lines".

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
LearnMQSI
PostPosted: Sun Mar 19, 2006 1:06 pm    Post subject: Reply with quote

Centurion

Joined: 20 Aug 2002
Posts: 137

Here are the details:

1. My Imported Cobol Copybook
05 ID PIC S9(9) COMP.
2.My Physical type for above COMP field:
PIC S9(9) COMP. - Physical Type = Integer, Length Count = 4

3. My Input XML File - I have created this XML file using XMLSPY

<ContrID>123400000</ContrID>

4. REQUEST MESSAGE FLOW (XML-to-MRM) Code- Unfortunately I cannot paste my message flow here

InputNode Properties:
Default Tab - Message Domain - XML
Advance Tab - Transaction Mode - No
- Other Mode - Default
- Logical Order - Box Checked
- Convert - Box Checked
Compute Node1- (Message Template) - Copy Entire Message
SET OutputRoot = InputRoot;
-- Enter SQL below this line. SQL above this line might be regenerated, causing any modifications to be lost.

Compute Node2- (XML-to-MRM, Fields Mapping) - Copy message Headers
DECLARE I INTEGER;
SET I = 1;
WHILE I < CARDINALITY(InputRoot.*[]) DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I=I+1;
END WHILE;
-- Enter SQL below this line. SQL above this line might be regenerated, causing any modifications to be lost.

SET OutputRoot.MQMD.CodedCharSetId = 500;
SET OutputRoot.MQMD."Encoding" = 785;


--Mapping Rate Message
SET "OutputRoot"."MRM"."XXX"."ID" = CAST("InputRoot"."XML"."XXX"."ID" AS INTEGER CCSID InputRoot.Properties.CodedCharSetId Encoding InputRoot.Properties.Encoding);

5.OUTPUT MRM MESSAGE FROM ABOVE XML INPUT MESSAGE
NOTE - THIS MESSAGE SHOWING IN IH03 using both i.e. Data and Hex values(I have highlighted Hex value for ContrID field(Which is good, in Decimal equal to 123400000).

00000000 O..ÞØP.. 2005-12- D63A32AE 80D70001 F2F0F0F5 60F1F260
00000016 08NPOL.. .À....20 F0F8D5D7 D6D30000 00640000 100CF2F0
00000032 05-12-08 ......20 F0F560F1 F260F0F8 00020000 000CF2F0
00000048 06-02-17 -11.03.5 F0F660F0 F260F1F7 60F1F14B F0F34BF5
00000064 0.573399 .. F04BF5F7 F3F3F9F9 0001

6. REPLY MESSAGE FLOW (MRM-to-XML)
Note - I PUT above generated MRM message as INPUT message to this message flow. Actually, this MRM message would come from Mainframe which I would be testing this week, but I did sent this MRM message to Mainframe and looked at its HEX values which are looking good at the moment.

MQInputNode Default Tab - Message Domain - MRM
- Message Set - Message Set ID
- Message Type - Message ID
- Message Format - CWF
- Advance Tab - Transaction Mode - No
- Other Mode - Default
- Logical Order - Box Checked
- Convert - Box Checked

Compute Node - MRM-to-XML (Copy message headers) - Note - I have highlighted ContrID mapping field below again

DECLARE I INTEGER;
SET I = 1;
WHILE I < CARDINALITY(InputRoot.*[]) DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I=I+1;
END WHILE;
-- Enter SQL below this line. SQL above this line might be regenerated, causing any modifications to be lost.

SET OutputRoot.MQMD.CodedCharSetId = 819;
SET OutputRoot.MQMD."Encoding" = 273;


--Mapping Rate Message
SET "OutputRoot"."XML"."XXX"."ID" = CAST("InputRoot"."MRM"."XXX"."ID" AS DECIMAL CCSID InputRoot.CodedCharSetId Encoding InputRoot.Properties.Encoding);

7. OUTPUT XML Message from above mapping

<ContrID>-837361960</ContrID>

I hope this will provide what exactly happening, again thaks a lot for sheding some light on it!!!!
_________________
IBM Certified System Administrator - WebSphere MQ 5.3


Last edited by LearnMQSI on Mon Mar 20, 2006 1:54 pm; edited 1 time in total
Back to top
View user's profile Send private message
EddieA
PostPosted: Sun Mar 19, 2006 9:30 pm    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

Quote:
and traces within the flow, before and after the conversions

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
LearnMQSI
PostPosted: Mon Mar 20, 2006 7:12 am    Post subject: Reply with quote

Centurion

Joined: 20 Aug 2002
Posts: 137

Hi EddieA,

Here are my traces for both Request and Reply logs:
NOTE - Don't worry about the SourceQueue Name in the trace, this is how I setup for now, later I will change them.

Again thanks a lot for all your help!!!

REQUEST LOG

XML BEFORE PARSED
(0x1000000)ID = (
(0x2000000) = '976400000'
)


MRM AFTER PARSED
(0x3000000)ID = '123400000'

REPLY LOG

MRM BEFORE PARSED
(0x300000B)ID = -837361960

XML AFTER PARSED
(0x1000000)ID = (
(0x2000000) = -837361960
)

_________________
IBM Certified System Administrator - WebSphere MQ 5.3


Last edited by LearnMQSI on Mon Mar 20, 2006 1:46 pm; edited 1 time in total
Back to top
View user's profile Send private message
LearnMQSI
PostPosted: Mon Mar 20, 2006 1:38 pm    Post subject: Reply with quote

Centurion

Joined: 20 Aug 2002
Posts: 137

Hi EddieA,

thank you so much for all your help and your precious time you have given to look at my issue. I have figured it out. Actually, it was Convert option on my reply message flow.

having said that, I still have to test it having a round trip sending messages to Mainframe and getting reply from Mainframe. I will get back to you guys should I face any more issues.

Again, thanks a lot for all of you guys specially to EddieA, JT, and, jefflowrey.

You guys are just amazing and very helpful, keep it up good work guys!!!
_________________
IBM Certified System Administrator - WebSphere MQ 5.3
Back to top
View user's profile Send private message
LearnMQSI
PostPosted: Mon Mar 20, 2006 2:24 pm    Post subject: Reply with quote

Centurion

Joined: 20 Aug 2002
Posts: 137

Hi guys,

I'm back again.

Issue - Packed Decimal field.
Input Value - 100.2
Output Value - 100.0000(I guess it is wrong, I'm expecting 100.2000, am I expecting correct???)


I have a field in Copybook as follows:

XXX PIC S999V9999 COMP-3

CWF Setting for above field:
Physical Type - Packed Decimal
Length Count - 4
Signed - Yes

What is the valid and Max value I should be throwing in this field in my xml message??? Is it something like this:
<FieldName>999.9999</FieldName>

XML-to-MRM MESSAGE FLOW

SET "OutputRoot"."MRM"."SML_MSG"."MQ_CONTR_RATE_FACTOR1" = CAST(ref1."ContrRateFactor" AS DECIMAL(3,4) CCSID InputRoot.Properties.CodedCharSetId Encoding InputRoot.Properties.Encoding);

Is this correct?

MRM-to-XML MESSAGE FLOW(This is how I'm CASTing currently, is this correct???)

SET "OutputRoot"."XML"."RateMessage"."ContrRateFactor" = CAST("InputRoot"."MRM"."SML_MSG"."MQ_CONTR_RATE_FACTOR1" AS DECIMAL(3,4) CCSID InputRoot.CodedCharSetId Encoding InputRoot.Properties.Encoding);
_________________
IBM Certified System Administrator - WebSphere MQ 5.3
Back to top
View user's profile Send private message
EddieA
PostPosted: Mon Mar 20, 2006 3:50 pm    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

For COMP-3, the decimal point is implied, and from memory, there's no way to specify that in the MRM. So, if you have S999V9999 COMP-3, and you want the value 100.2, you would use 1002000.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
LearnMQSI
PostPosted: Mon Mar 20, 2006 7:12 pm    Post subject: Reply with quote

Centurion

Joined: 20 Aug 2002
Posts: 137

Hi EddieA,

I can't thank you enough, you are a real professional.

Thank you so much again and again. I will try it and let you know how it goes.
_________________
IBM Certified System Administrator - WebSphere MQ 5.3
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Mar 21, 2006 1:48 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5543
Location: Southampton

From the docs for Virtual Decimal Point property, CWF format:
Quote:
Specify the number of places to the left (for a positive value) or right (for a negative value) that a decimal point should be moved from its assumed position. For example, a decimal element containing 1234 with a Virtual Decimal value of 3 is 1.234. This is equivalent to 'V' or 'P' in a COBOL picture clause. There is no C equivalent

Note that Virtual Decimal Point is only offered on elements with a logical type of type 'decimal' - elements with a logical type of integer don't have it ( which seems reasonable to me )
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2, 3 Page 3 of 3

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » PIC S9(4) COMP Fields
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.