Author |
Message
|
sarasu |
Posted: Fri Feb 15, 2013 7:51 am Post subject: Calculate length of data segment for DFDL |
|
|
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 |
|
 |
lancelotlinc |
Posted: Fri Feb 15, 2013 8:05 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
sarasu |
Posted: Fri Feb 15, 2013 8:09 am Post subject: |
|
|
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 |
|
 |
lancelotlinc |
Posted: Fri Feb 15, 2013 8:10 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
kimbert |
Posted: Fri Feb 15, 2013 9:15 am Post subject: |
|
|
 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 |
|
 |
kimbert |
Posted: Fri Feb 15, 2013 9:26 am Post subject: |
|
|
 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 |
|
 |
sarasu |
Posted: Fri Feb 15, 2013 12:19 pm Post subject: |
|
|
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 |
|
 |
lancelotlinc |
Posted: Fri Feb 15, 2013 12:33 pm Post subject: |
|
|
 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 |
|
 |
sarasu |
Posted: Fri Feb 15, 2013 12:35 pm Post subject: |
|
|
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 |
|
 |
lancelotlinc |
Posted: Fri Feb 15, 2013 12:37 pm Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
|
Back to top |
|
 |
mqjeff |
Posted: Fri Feb 15, 2013 12:50 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
|
Back to top |
|
 |
sarasu |
Posted: Fri Feb 15, 2013 12:56 pm Post subject: |
|
|
Master
Joined: 02 Feb 2006 Posts: 229
|
Code: |
DECLARE options INTEGER BITOR(FolderBitStream, ValidateNone);
DECLARE SegmentData BLOB;
|
|
|
Back to top |
|
 |
mqjeff |
Posted: Fri Feb 15, 2013 6:28 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Is there documentation that says that the DFDL parser supports FolderBitStream? |
|
Back to top |
|
 |
sarasu |
Posted: Sat Feb 16, 2013 6:16 pm Post subject: |
|
|
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 |
|
 |
mqjeff |
Posted: Sun Feb 17, 2013 12:08 pm Post subject: |
|
|
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 |
|
 |
|