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 » creating new XML from Cobol Copy book

Post new topic  Reply to topic
 creating new XML from Cobol Copy book « View previous topic :: View next topic » 
Author Message
mqsiadm
PostPosted: Wed May 03, 2006 6:34 am    Post subject: creating new XML from Cobol Copy book Reply with quote

Novice

Joined: 05 Mar 2006
Posts: 12

Hi All,

I am working with V6 broker and trying to extract cpy book data from xml element and parse it against a message defination file.

Can some buddy please give me some inputs on this, I have gone through the other posts of ASBITSTREAM and tried those but still its not working.

I tried but it seems its not working here...
Quote:

DECLARE bodyBlob BLOB ASBITSTREAM(InputRoot.XML, InputProperties.Encoding, InputProperties.CodedCharSetId);
DECLARE creationPtr REFERENCE TO OutputRoot;
CREATE LASTCHILD OF creationPtr DOMAIN('CWF') PARSE(bodyBlob,
InputProperties.Encoding,
InputProperties.CodedCharSetId);


Thanks
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed May 03, 2006 6:51 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
not working
Details please.
Back to top
View user's profile Send private message
mqsiadm
PostPosted: Wed May 03, 2006 7:06 am    Post subject: Reply with quote

Novice

Joined: 05 Mar 2006
Posts: 12

Quote:


DECLARE bodyBlob BLOB ASBITSTREAM(InputRoot.XML, InputProperties.Encoding, InputProperties.CodedCharSetId);


This is not populating any data in the bodyBlod, in the debugger i see the bodyBlob but its empty

Quote:

CREATE LASTCHILD OF creationPtr DOMAIN('CWF') PARSE(bodyBlob,
InputProperties.Encoding,
InputProperties.CodedCharSetId);


the broker throws null eception while parsing the CWF.
Back to top
View user's profile Send private message
JT
PostPosted: Wed May 03, 2006 7:43 am    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

Try this:
Quote:
DECLARE bodyBlob BLOB ASBITSTREAM(InputRoot.XML,InputProperties.Encoding,InputProperties.CodedCharSetId,,,,RootBitStream);
Back to top
View user's profile Send private message
JT
PostPosted: Wed May 03, 2006 7:51 am    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

You'll also need to change this:

Quote:
CREATE LASTCHILD OF creationPtr DOMAIN('CWF') PARSE(bodyBlob,InputProperties.Encoding,InputProperties.CodedCharSetId);

to this:

Quote:
CREATE LASTCHILD OF creationPtr DOMAIN('MRM') PARSE(bodyBlob,InputProperties.Encoding,InputProperties.CodedCharSetId,'<msgSet>','<msgType>','<msgFormat>');
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed May 03, 2006 7:53 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
DECLARE bodyBlob BLOB ASBITSTREAM(InputRoot.XML, ...
Are you really trying to convert the entire XML message body to a BLOB and pass it to the CWF parser? Surely you want one of the subfields, in which case you're going to need FolderBitstream. ( if you really want to pass the entire message to CWF, don't bother parsing it as XML in the first place)
Back to top
View user's profile Send private message
mqsiadm
PostPosted: Wed May 03, 2006 7:55 am    Post subject: Reply with quote

Novice

Joined: 05 Mar 2006
Posts: 12

Am i using the correct method?

My incoming xml is
Quote:
<Msg><data>abnd1245555</data><Msg>

abnd1245555 is the Cobol copy book.




I have to parse this data to a message definition file which I have defined. My esql is

Quote:

DECLARE parseOptions INTEGER BITOR(FolderBitStream, ValidateContent, ValidateValue, ValidateException);
DECLARE iBitStream BLOB;
DECLARE CChar CHARACTER;
CREATE FIELD Environment.Variables.CCpy;
DECLARE CpyPtr REFERENCE TO Environment.Variables.CCpy;

-- -- Set the CWF format for output by the MRM domain
SET OutputRoot.Properties.MessageSet = 'MSG_SET';
SET OutputRoot.Properties.MessageType = ‘Data';
SET OutputRoot.Properties.MessageFormat = 'CWF1';



SET iBitStream = ASBITSTREAM(InputRoot.XML.MSG
OPTIONS RootBitStream
-- OPTIONS parseOptions
CCSID InputRoot.Properties.CodedCharSetId
ENCODING InputRoot.Properties.Encoding
-- CCSID OutputRoot.MQMD.CodedCharSetId
-- ENCODING OutputRoot.MQMD.Encoding
SET InputRoot.Properties.MessageSet
TYPE InputRoot.Properties.MessageType
FORMAT InputRoot.Properties.MessageFormat
);

DECLARE createPtr REFERENCE TO OutputRoot;
CREATE LASTCHILD OF createPtr DOMAIN('CWF1') PARSE(iBitStream,
InputProperties.Encoding,InputProperties.CodedCharSetId,",",FolderBitStream);


And can some budby please guide me what should i use in "PARSE(iBitStream,
InputProperties.Encoding,InputProperties.CodedCharSetId,",",FolderBitStream); " ESQL is giving syntax error for ,",", FolderBitStram.

This is all new to me and i have never used this option previously, this is very confusing......
Back to top
View user's profile Send private message
mqsiadm
PostPosted: Wed May 03, 2006 8:03 am    Post subject: Reply with quote

Novice

Joined: 05 Mar 2006
Posts: 12

JT wrote:
You'll also need to change this:

Quote:
CREATE LASTCHILD OF creationPtr DOMAIN('CWF') PARSE(bodyBlob,InputProperties.Encoding,InputProperties.CodedCharSetId);

to this:

Quote:
CREATE LASTCHILD OF creationPtr DOMAIN('MRM') PARSE(bodyBlob,InputProperties.Encoding,InputProperties.CodedCharSetId,'<msgSet>','<msgType>','<msgFormat>');



This gives me exception 2906
Back to top
View user's profile Send private message
mqsiadm
PostPosted: Wed May 03, 2006 8:06 am    Post subject: Reply with quote

Novice

Joined: 05 Mar 2006
Posts: 12

[quote="kimbert"]
Quote:
if you really want to pass the entire message to CWF, don't bother parsing it as XML in the first place


could you please explain.....
Back to top
View user's profile Send private message
JT
PostPosted: Wed May 03, 2006 10:54 am    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

Post the entire BIP2906 error message.
Back to top
View user's profile Send private message
kimbert
PostPosted: Wed May 03, 2006 1:48 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
could you please explain...
You were passing InputRoot.XML as the first parameter to ASBITSTREAM. That was obviously a mistake on your part, because in your next post you passed InputRoot.XML.MSG instead.

You need to know the following things:
1. Names are case-sensitive. InputRoot.XML.MSG is not the same as InputRoot.XML.Msg. Which one is correct - your example message or your ESQL?
2. MRM is a domain. A physical format like 'CWF1' is not the same thing as a domain. In one of your posts, you were passing 'CWF' as the domain parameter for CREATE LASTCHILD...PARSE.
3. The XML domain is a poor choice for parsing XML in v6. You should be using XMLNSC unless you have a good reason not to.
4. You're getting free help when you ask questions here, so take the time to supply good, accurate information. If you get an error ( e.g.BIP2906) read the full text of the error and see whether it helps you toward a solution. If you're still stuck, post the full text of the error, because it will contain useful information about what you were doing when the failure occurred.
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 » creating new XML from Cobol Copy book
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.