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 » Calculate length of data segment for DFDL

Post new topic  Reply to topic Goto page 1, 2  Next
 Calculate length of data segment for DFDL « View previous topic :: View next topic » 
Author Message
sarasu
PostPosted: Fri Feb 15, 2013 7:51 am    Post subject: Calculate length of data segment for DFDL Reply with quote

Master

Joined: 02 Feb 2006
Posts: 229

All,

I have an example for calculating length of data segment from a message set in CWF format as below.

ASBITSTREAM(OutputRoot.MRM.IMSSegment1.IMSData.msg_CUSTDET
OPTIONSoptions
ENCODINGBITOR(MQENC_INTEGER_NORMAL,MQENC_DECIMAL_NORMAL,MQENC_FLOAT_S390)
CCSID500SET'NO51LGO002001'TYPE'msg_CUSTDET'FORMAT'CWF1');

I need to calculate the same for my DFDL under the Test Service (Not having any message set ID).

What needs to be changed using the 'ASBITSTREAM' in order to calculate the DATA length.

ASBITSTREAM(OutputRoot.MRM.IMSSegment1.IMSData.msg_CUSTDET
OPTIONSoptions
ENCODINGBITOR(MQENC_INTEGER_NORMAL,MQENC_DECIMAL_NORMAL,MQENC_FLOAT_S390)
CCSID500SET'NO51LGO002001'TYPE'IMSDATA'FORMAT'DFDL');
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Fri Feb 15, 2013 8:05 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Your post is jumbled. Please use code tags.

What happens when you try it? Do you get an error?
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
sarasu
PostPosted: Fri Feb 15, 2013 8:09 am    Post subject: Reply with quote

Master

Joined: 02 Feb 2006
Posts: 229

As I dont have a message set ID, I need to know for DFDL & Service combination, what I need to enter in place of the Message SET ID.

ASBITSTREAM(OutputRoot.MRM.IMSSegment1.IMSData.msg_CUSTDET
OPTIONSoptions
ENCODINGBITOR(MQENC_INTEGER_NORMAL,MQENC_DECIMAL_NORMAL,MQENC_FLOAT_S390)
CCSID500SET'NO51LGO002001'TYPE'IMSDATA'FORMAT'DFDL');
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Fri Feb 15, 2013 8:10 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Do you understand about [c o d e ] tags?

Note there are limitations in the current DFDL implementation for WMB regarding length:

http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/index.jsp?topic=%2Fcom.ibm.etools.mft.doc%2Fdf00150_.htm

You may also want to refer to the ISO8583 example, which has some really good code for you to refer to that demonstrates what may apply to your particular situation.

http://publib.boulder.ibm.com/infocenter/wmbhelp/v8r0m0/index.jsp?topic=%2Fcom.ibm.etools.mft.samples.iso8583.doc%2Fdoc%2Fbackground.htm
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
kimbert
PostPosted: Fri Feb 15, 2013 9:15 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

DFDL does not use message sets at all. It uses the xsds that have been deployed to the application ( or to the EG if you are not using applications yet ). So you only need to specify the root element name in the 'TYPE' parameter of ASBITSTREAM. The other parameters ( SET/FORMAT ) are not required.

Please try that, and tell us how you get on. Please make sure that you quote the full text of any error messages that you get. Look in Windows Event Viewer or take a user trace if necessary.
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Feb 15, 2013 9:26 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Quote:
I have an example for calculating length of data segment from a message set in CWF format
Please can you explain that in more detail. It is possible that DFDL can do it more simply than MRM, but I can't be sure without more information.
Back to top
View user's profile Send private message
sarasu
PostPosted: Fri Feb 15, 2013 12:19 pm    Post subject: Reply with quote

Master

Joined: 02 Feb 2006
Posts: 229

Sure.

From the below url, I have the data length calculation using an MRM.
http://www.ibm.com/developerworks/websphere/library/techarticles/0709_suarez/0709_suarez.html

Where as the one I am doing is from the Service that I have created.

I have tried using the below format. But nothing is writing using the trace.

SET SegmentData = ASBITSTREAM(OutputRoot.DFDL.IMSTRANRECORD OPTIONS options
ENCODING BITOR(MQENC_INTEGER_NORMAL, MQENC_DECIMAL_NORMAL, MQENC_FLOAT_S390)
CCSID 500 TYPE'IMSTRANRECORD');
SET OutputRoot.DFDL.IMSDATA.IMS_MQ_LL = LENGTH(SegmentData)+ 12 + 8;
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Fri Feb 15, 2013 12:33 pm    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

sarasu wrote:
Sure.

From the below url, I have the data length calculation using an MRM.
http://www.ibm.com/developerworks/websphere/library/techarticles/0709_suarez/0709_suarez.html

Where as the one I am doing is from the Service that I have created.

I have tried using the below format. But nothing is writing using the trace.

SET SegmentData = ASBITSTREAM(OutputRoot.DFDL.IMSTRANRECORD OPTIONS options
ENCODING BITOR(MQENC_INTEGER_NORMAL, MQENC_DECIMAL_NORMAL, MQENC_FLOAT_S390)
CCSID 500 TYPE'IMSTRANRECORD');
SET OutputRoot.DFDL.IMSDATA.IMS_MQ_LL = LENGTH(SegmentData)+ 12 + 8;



CODE TAGS:

[c o d e ]
Code:
SET SegmentData = ASBITSTREAM(OutputRoot.DFDL.IMSTRANRECORD OPTIONS options
ENCODING BITOR(MQENC_INTEGER_NORMAL, MQENC_DECIMAL_NORMAL, MQENC_FLOAT_S390)
CCSID 500 TYPE'IMSTRANRECORD');
SET OutputRoot.DFDL.IMSDATA.IMS_MQ_LL = LENGTH(SegmentData)+ 12 + 8;
[/ c o d e ]

C A P I C H E ?? http://en.wiktionary.org/wiki/capiche
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER


Last edited by lancelotlinc on Fri Feb 15, 2013 12:36 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
sarasu
PostPosted: Fri Feb 15, 2013 12:35 pm    Post subject: Reply with quote

Master

Joined: 02 Feb 2006
Posts: 229

Got it

Code:

SET SegmentData = ASBITSTREAM(OutputRoot.DFDL.IMSTRANRECORD OPTIONS options
ENCODING BITOR(MQENC_INTEGER_NORMAL, MQENC_DECIMAL_NORMAL, MQENC_FLOAT_S390)
CCSID 500 TYPE'IMSTRANRECORD');
SET OutputRoot.DFDL.IMSDATA.IMS_MQ_LL = LENGTH(SegmentData)+ 12 + 8;
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Fri Feb 15, 2013 12:37 pm    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

sarasu wrote:
Got it


G-O-O-D !!
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Fri Feb 15, 2013 12:50 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

What is options set to?
Back to top
View user's profile Send private message
sarasu
PostPosted: Fri Feb 15, 2013 12:56 pm    Post subject: Reply with quote

Master

Joined: 02 Feb 2006
Posts: 229

Code:

DECLARE options INTEGER BITOR(FolderBitStream, ValidateNone);
      DECLARE SegmentData BLOB;
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Feb 15, 2013 6:28 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Is there documentation that says that the DFDL parser supports FolderBitStream?
Back to top
View user's profile Send private message
sarasu
PostPosted: Sat Feb 16, 2013 6:16 pm    Post subject: Reply with quote

Master

Joined: 02 Feb 2006
Posts: 229

No. I just took form the IBM best practices example.
Please let me know if i need to make any changes or corrections.

Thanks
Back to top
View user's profile Send private message
mqjeff
PostPosted: Sun Feb 17, 2013 12:08 pm    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

sarasu wrote:
No. I just took form the IBM best practices example.


Did that example specifically refer to the DFDL parser, or did it mention the XMLNSC parser?

There's a reason I keep making a specific reference to the DFDL parser as a specific thing that is different than other things, like the XMLNSC parser.

There is a reason I am asking about the options parameter you have supplied, and making a point of mentioning that the values it can hold are dependent on what parser is involved.

sarasu wrote:
Please let me know if i need to make any changes or corrections.


If the code you have doesn't actually work, then you clearly need to make some change or correction.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Calculate length of data segment for DFDL
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.