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 » Input CWF Variable

Post new topic  Reply to topic
 Input CWF Variable « View previous topic :: View next topic » 
Author Message
ovasquez
PostPosted: Wed Jul 15, 2009 3:52 pm    Post subject: Input CWF Variable Reply with quote

Centurion

Joined: 09 Dec 2005
Posts: 141
Location: Lima, Peru

I need receive a variable message: ..COPY
01 MESSAGE.
03 FIELD1 PIC X(01).
03 FIELD2 PIC X(01).
03 FIELD3 PIC X(01).
and send XML message
for example:
Message Input:ABC
Message Ouput:
<XMLX><TAG1>A</TAG1><TAG2>B</TAG2><TAG3>C</TAG3></XMLX>
But FIELD2 and FIELD3 are optional, maybe i receive only:
A or AB

My flow:
MQInput->Compute->MQOutput
I create a MessagegeDefinitionFile and CWF for this message, and put this in parser for MQInput..but throw error:
"CPI Text Buffer Input Data Too Short"
I change TDS format and display same error:
"Not enough data in bitstream"

Is posibled create CWF or TDS format for varible message¿?
Environment:
WMB6.1
_________________
Oscar Vásquez Flores
Back to top
View user's profile Send private message Send e-mail
jbanoop
PostPosted: Wed Jul 15, 2009 4:56 pm    Post subject: Reply with quote

Chevalier

Joined: 17 Sep 2005
Posts: 401
Location: SC

I believe that when you have optional record(s) you should model the message using TDS instead of CWF with fixed length (for delimiter). The CWF parser will not account for optional fields.

I had seen a post recently in which Kimbert had clearly mentioned this. Try searching the forum.
Back to top
View user's profile Send private message Yahoo Messenger
ovasquez
PostPosted: Wed Jul 15, 2009 5:21 pm    Post subject: Reply with quote

Centurion

Joined: 09 Dec 2005
Posts: 141
Location: Lima, Peru

this...?
"varying length copybook message"
http://www.mqseries.net/phpBB2/viewtopic.php?t=49880&postdays=0&postorder=asc&start=0

i review but not have solution, i use TDS format but problem continue.
_________________
Oscar Vásquez Flores
Back to top
View user's profile Send private message Send e-mail
jbanoop
PostPosted: Wed Jul 15, 2009 6:17 pm    Post subject: Reply with quote

Chevalier

Joined: 17 Sep 2005
Posts: 401
Location: SC

physical type : text1 (tds)

msg_type (fixed length, min occurance =1, max occurance =1)
|---field1 (length=1, min occurance =1, max occurance =1)
|---field2 (length=1, min occurance =0, max occurance =1)
|---field3 (length=1, min occurance =0, max occurance =1)

once the message has come in thru the MQInput, then just write it out as XML (add an XML physical type to the message set)
Back to top
View user's profile Send private message Yahoo Messenger
mqjeff
PostPosted: Thu Jul 16, 2009 8:44 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

jbanoop wrote:
once the message has come in thru the MQInput, then just write it out as XML (add an XML physical type to the message set)

No, that would require using MRM-XML.

Use XMLNSC for all XML.
Back to top
View user's profile Send private message
jbanoop
PostPosted: Thu Jul 16, 2009 9:33 am    Post subject: Reply with quote

Chevalier

Joined: 17 Sep 2005
Posts: 401
Location: SC

from the infocenter :

http://publib.boulder.ibm.com/infocenter/wmbhelp/v6r1m0/index.jsp?topic=/com.ibm.etools.mft.doc/ad70530_.htm

Quote:
Tip: If you are taking non-XML data that has been parsed by the CWF or TDS formats of the MRM domain, and merely transforming the data to the equivalent XML, use the MRM domain. This can be achieved by adding an XML physical format to the message set with default values, and changing the Message Format in the Properties folder of the message tree.
Back to top
View user's profile Send private message Yahoo Messenger
ovasquez
PostPosted: Thu Jul 16, 2009 9:39 am    Post subject: Reply with quote

Centurion

Joined: 09 Dec 2005
Posts: 141
Location: Lima, Peru

But..for performance is better XMLNSC for output or XML-MRM, i review performance report but is not clear...for Input XMLNSC is better than XML-MRM
_________________
Oscar Vásquez Flores
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Thu Jul 16, 2009 9:45 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Right. If you are 100% positive that all you need to do is create an XML document with exactly the same structure as the cobol copybook and exactly the same tag names as the cobol copybook and no namespaces at all and you will require no time at all to edit the physical properties of the XML layer in the MRM model... then you should use that.

That's about .01% of the real life cases.
Back to top
View user's profile Send private message
ovasquez
PostPosted: Thu Jul 16, 2009 9:49 am    Post subject: Reply with quote

Centurion

Joined: 09 Dec 2005
Posts: 141
Location: Lima, Peru

I have 2 message definition file:
1 for Copy and 1 for XML Tags ..so my case is in 99.99%
_________________
Oscar Vásquez Flores
Back to top
View user's profile Send private message Send e-mail
ovasquez
PostPosted: Thu Jul 16, 2009 12:37 pm    Post subject: Reply with quote

Centurion

Joined: 09 Dec 2005
Posts: 141
Location: Lima, Peru

jbanoop wrote:
physical type : text1 (tds)

msg_type (fixed length, min occurance =1, max occurance =1)
|---field1 (length=1, min occurance =1, max occurance =1)
|---field2 (length=1, min occurance =0, max occurance =1)
|---field3 (length=1, min occurance =0, max occurance =1)

once the message has come in thru the MQInput, then just write it out as XML (add an XML physical type to the message set)


I Change for TDS but error continue...
MQInput->Trace->Compute->Trace->MQOuput

Error = 'Not enough data in bitstream'
My MessageSet
*************
messsageSet.mset
TDS Format ->Message Standar:User Define Mixed
->OuputPolicy for missgin elements:UseNullValue
->Derived default length from logical:Not Check
All field in Message Definition file, for example field1:
Local Element:
Nillabel:Check
Physical Type:Text
Length:1
Length unites:Characters
Pading Character:SPACE
Encoding Null:NullLiteralFill
Encoding Null Value:SPACE

What is the Problem?

All Trace:
=============================================
Trace0[2009-07-16 15:25:04.366435]
=============================================
Root[( ['MQROOT' : 0x2d42550]
(0x01000000:Name ):Properties = ( ['MQPROPERTYPARSER' : 0x2c93d20]
(0x03000000:NameValue):MessageSet = 'Test' (CHARACTER)
(0x03000000:NameValue):MessageType = '{}:Fijo' (CHARACTER)
(0x03000000:NameValue):MessageFormat = 'Text1' (CHARACTER)
(0x03000000:NameValue):Encoding = 273 (INTEGER)
(0x03000000:NameValue):CodedCharSetId = 819 (INTEGER)
(0x03000000:NameValue):Transactional = TRUE (BOOLEAN)
(0x03000000:NameValue):Persistence = FALSE (BOOLEAN)
(0x03000000:NameValue):CreationTime = GMTTIMESTAMP '2009-07-16 15:25:04.280' (GMTTIMESTAMP)
(0x03000000:NameValue):ExpirationTime = -1 (INTEGER)
(0x03000000:NameValue):Priority = 0 (INTEGER)
(0x03000000:NameValue):ReplyIdentifier = X'000000000000000000000000000000000000000000000000' (BLOB)
(0x03000000:NameValue):ReplyProtocol = 'MQ' (CHARACTER)
(0x03000000:NameValue):Topic = NULL
(0x03000000:NameValue):ContentType = '' (CHARACTER)
(0x03000000:NameValue):IdentitySourceType = '' (CHARACTER)
(0x03000000:NameValue):IdentitySourceToken = '' (CHARACTER)
(0x03000000:NameValue):IdentitySourcePassword = '' (CHARACTER)
(0x03000000:NameValue):IdentitySourceIssuedBy = '' (CHARACTER)
(0x03000000:NameValue):IdentityMappedType = '' (CHARACTER)
(0x03000000:NameValue):IdentityMappedToken = '' (CHARACTER)
(0x03000000:NameValue):IdentityMappedPassword = '' (CHARACTER)
(0x03000000:NameValue):IdentityMappedIssuedBy = '' (CHARACTER)
)
(0x01000000:Name ):MQMD = ( ['MQHMD' : 0xa664c0]
(0x03000000:NameValue):SourceQueue = 'QL1' (CHARACTER)
(0x03000000:NameValue):Transactional = TRUE (BOOLEAN)
(0x03000000:NameValue):Encoding = 273 (INTEGER)
(0x03000000:NameValue):CodedCharSetId = 819 (INTEGER)
(0x03000000:NameValue):Format = ' ' (CHARACTER)
(0x03000000:NameValue):Version = 2 (INTEGER)
(0x03000000:NameValue):Report = 0 (INTEGER)
(0x03000000:NameValue):MsgType = 8 (INTEGER)
(0x03000000:NameValue):Expiry = -1 (INTEGER)
(0x03000000:NameValue):Feedback = 0 (INTEGER)
(0x03000000:NameValue):Priority = 0 (INTEGER)
(0x03000000:NameValue):Persistence = 0 (INTEGER)
(0x03000000:NameValue):MsgId = X'414d5120574d42514d33202020202020e4395f4a20004602' (BLOB)
(0x03000000:NameValue):CorrelId = X'000000000000000000000000000000000000000000000000' (BLOB)
(0x03000000:NameValue):BackoutCount = 0 (INTEGER)
(0x03000000:NameValue):ReplyToQ = ' ' (CHARACTER)
(0x03000000:NameValue):ReplyToQMgr = 'WMBQM3 ' (CHARACTER)
(0x03000000:NameValue):UserIdentifier = ' ' (CHARACTER)
(0x03000000:NameValue):AccountingToken = X'0000000000000000000000000000000000000000000000000000000000000000' (BLOB)
(0x03000000:NameValue):ApplIdentityData = ' ' (CHARACTER)
(0x03000000:NameValue):PutApplType = 0 (INTEGER)
(0x03000000:NameValue):PutApplName = ' ' (CHARACTER)
(0x03000000:NameValue):PutDate = DATE '2009-07-16' (DATE)
(0x03000000:NameValue):PutTime = GMTTIME '15:25:04.280' (GMTTIME)
(0x03000000:NameValue):ApplOriginData = ' ' (CHARACTER)
(0x03000000:NameValue):GroupId = X'000000000000000000000000000000000000000000000000' (BLOB)
(0x03000000:NameValue):MsgSeqNumber = 1 (INTEGER)
(0x03000000:NameValue):Offset = 0 (INTEGER)
(0x03000000:NameValue):MsgFlags = 0 (INTEGER)
(0x03000000:NameValue):OriginalLength = -1 (INTEGER)
)
(0x01000021:Name+):MRM =

=============================================
ERROR[2009-07-16 15:25:05.633151]
=============================================
ExceptionList[( ['MQROOT' : 0x2d45298]
(0x01000000:Name):RecoverableException = (
(0x03000000:NameValue):File = 'F:\build\S610_P\src\DataFlowEngine\ImbTraceNode.cpp' (CHARACTER)
(0x03000000:NameValue):Line = 341 (INTEGER)
(0x03000000:NameValue):Function = 'ImbTraceNode::evaluate' (CHARACTER)
(0x03000000:NameValue):Type = 'ComIbmTraceNode' (CHARACTER)
(0x03000000:NameValue):Name = 'MF_Posicional#FCMComposite_1_4' (CHARACTER)
(0x03000000:NameValue):Label = 'MF_Posicional.Trace' (CHARACTER)
(0x03000000:NameValue):Catalog = 'BIPv610' (CHARACTER)
(0x03000000:NameValue):Severity = 3 (INTEGER)
(0x03000000:NameValue):Number = 2230 (INTEGER)
(0x03000000:NameValue):Text = 'Caught exception and rethrowing' (CHARACTER)
(0x01000000:Name ):ParserException = (
(0x03000000:NameValue):File = 'F:\build\S610_P\src\MTI\MTIforBroker\MtiImbParser2\MtiImbParser.cpp' (CHARACTER)
(0x03000000:NameValue):Line = 509 (INTEGER)
(0x03000000:NameValue):Function = 'MtiImbParser::parseFirstChild' (CHARACTER)
(0x03000000:NameValue):Type = 'ComIbmMQInputNode' (CHARACTER)
(0x03000000:NameValue):Name = 'MF_Posicional#FCMComposite_1_1' (CHARACTER)
(0x03000000:NameValue):Label = 'MF_Posicional.MQInput' (CHARACTER)
(0x03000000:NameValue):Catalog = 'BIPv610' (CHARACTER)
(0x03000000:NameValue):Severity = 3 (INTEGER)
(0x03000000:NameValue):Number = 5285 (INTEGER)
(0x03000000:NameValue):Text = 'ImbRecoverableException caught from worker->parseNext.' (CHARACTER)
(0x01000000:Name ):Insert = (
(0x03000000:NameValue):Type = 5 (INTEGER)
(0x03000000:NameValue):Text = 'Test' (CHARACTER)
)
(0x01000000:Name ):Insert = (
(0x03000000:NameValue):Type = 2 (INTEGER)
(0x03000000:NameValue):Text = '1' (CHARACTER)
)
(0x01000000:Name ):Insert = (
(0x03000000:NameValue):Type = 5 (INTEGER)
(0x03000000:NameValue):Text = 'Text1' (CHARACTER)
)
(0x01000000:Name ):Insert = (
(0x03000000:NameValue):Type = 5 (INTEGER)
(0x03000000:NameValue):Text = '/Fijo/Campo2' (CHARACTER)
)
(0x01000000:Name ):ParserException = (
(0x03000000:NameValue):File = 'F:\build\S610_P\src\cpi\pwf\nxd\nxdworker.cpp' (CHARACTER)
(0x03000000:NameValue):Line = 462 (INTEGER)
(0x03000000:NameValue):Function = 'NXDWorker::parseNext' (CHARACTER)
(0x03000000:NameValue):Type = '' (CHARACTER)
(0x03000000:NameValue):Name = '' (CHARACTER)
(0x03000000:NameValue):Label = '' (CHARACTER)
(0x03000000:NameValue):Catalog = 'BIPv610' (CHARACTER)
(0x03000000:NameValue):Severity = 3 (INTEGER)
(0x03000000:NameValue):Number = 5421 (INTEGER)
(0x03000000:NameValue):Text = 'TDS General Error' (CHARACTER)
(0x01000000:Name ):Insert = (
(0x03000000:NameValue):Type = 5 (INTEGER)
(0x03000000:NameValue):Text = 'Fijo' (CHARACTER)
)
(0x01000000:Name ):Insert = (
(0x03000000:NameValue):Type = 5 (INTEGER)
(0x03000000:NameValue):Text = '/Fijo/Campo3' (CHARACTER)
)
(0x01000000:Name ):Insert = (
(0x03000000:NameValue):Type = 2 (INTEGER)
(0x03000000:NameValue):Text = '2' (CHARACTER)
)
(0x01000000:Name ):ParserException = (
(0x03000000:NameValue):File = 'F:\build\S610_P\src\cpi\pwf\nxd\nxdscanner.cpp' (CHARACTER)
(0x03000000:NameValue):Line = 107 (INTEGER)
(0x03000000:NameValue):Function = 'NXDScanner::extractFixedLengthData' (CHARACTER)
(0x03000000:NameValue):Type = '' (CHARACTER)
(0x03000000:NameValue):Name = '' (CHARACTER)
(0x03000000:NameValue):Label = '' (CHARACTER)
(0x03000000:NameValue):Catalog = 'BIPv610' (CHARACTER)
(0x03000000:NameValue):Severity = 3 (INTEGER)
(0x03000000:NameValue):Number = 5426 (INTEGER)
(0x03000000:NameValue):Text = 'Not enough data in bitstream' (CHARACTER)
)
)
)
)
)]
_________________
Oscar Vásquez Flores
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Sun Jul 19, 2009 2:13 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

You have not told us whether the optional fields have any tag/identifier. If they do, then this is easy.
You have not described the message definition file settings which actually control the TDS parser. Quoting the settings in messageSet.mset is not particularly useful.

I presume you are setting Data Element Separation to 'Fixed Length'.
Try setting it to 'Use Data Pattern' and set the Data Pattern property to .{5} instead of setting the Length property to 5.
Back to top
View user's profile Send private message
ovasquez
PostPosted: Mon Jul 20, 2009 4:04 pm    Post subject: Reply with quote

Centurion

Joined: 09 Dec 2005
Posts: 141
Location: Lima, Peru

kimbert wrote:
You have not told us whether the optional fields have any tag/identifier. If they do, then this is easy.
You have not described the message definition file settings which actually control the TDS parser. Quoting the settings in messageSet.mset is not particularly useful.

I presume you are setting Data Element Separation to 'Fixed Length'.
Try setting it to 'Use Data Pattern' and set the Data Pattern property to .{5} instead of setting the Length property to 5.


I change Data Patten by {1} but display other error...
"MTI. Not all the buffer was used when reading message"
All my field have same properties in Message Definition File:
for example
field1
=====
Logical Properties
-->Nillable=Check
Phisical Properties
Physical Type:
--->Text1
------>Tag=
------>Data Patten=.{1}
------>Interpreter Element Value=None
------->Physical Type=Text
------>Length=0
------>Length unites=Characters
------>Justification=Left Justification
------>Padding Character=SPACE
------>Length Reference=
------>Inclusive Length Reference=
------>Encoding Null=NullLiteralFill
------>Encoding Null Value=SPACE
------>Repeat Reference=
------>Repeat Element Delimiter=

What is the problem...?
kimbert Do you have a valid example, please send you me ovasquez@bcp.com.pe , eoscarvf@gmail.com
Thanks.
_________________
Oscar Vásquez Flores
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Tue Jul 21, 2009 1:20 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Sorry - I don't have time to look into this problem in detail.
I suggest that you look again at your data pattern - it looks wrong.
Back to top
View user's profile Send private message
ovasquez
PostPosted: Tue Jul 21, 2009 1:23 pm    Post subject: Reply with quote

Centurion

Joined: 09 Dec 2005
Posts: 141
Location: Lima, Peru

kimbert wrote:
Sorry - I don't have time to look into this problem in detail.
I suggest that you look again at your data pattern - it looks wrong.


Ok don't worry, i thinked you have a valid example, but not problem, theorical TDS is solution...but in real is not succesful....
_________________
Oscar Vásquez Flores
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Tue Jul 21, 2009 2:03 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
theorical TDS is solution...but in real is not succesful
I'm fairly sure that TDS can parse your message...I just don't have time to work out exactly how to do it.
Your data pattern did not include the '.'
I'm just saying...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Input CWF Variable
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.