|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Dynamic Terminator Value |
« View previous topic :: View next topic » |
Author |
Message
|
nelson |
Posted: Wed Jun 03, 2015 12:42 pm Post subject: Dynamic Terminator Value |
|
|
 Partisan
Joined: 02 Oct 2012 Posts: 313
|
Hi all,
Is there any way to specify a dynamic quantity of spaces after a terminator string...? Something like this, but not fixed:
Code: |
MyTerminatorString%SP;%SP;%SP;...... |
Any idea?
Thanks in advance. |
|
Back to top |
|
 |
iibmate |
Posted: Wed Jun 03, 2015 3:04 pm Post subject: |
|
|
 Apprentice
Joined: 17 Mar 2015 Posts: 38 Location: Perth, WA
|
Use space() function in esql. |
|
Back to top |
|
 |
kimbert |
Posted: Thu Jun 04, 2015 12:53 am Post subject: |
|
|
 Jedi Council
Joined: 29 Jul 2003 Posts: 5542 Location: Southampton
|
Quote: |
Use space() function in esql |
A poor question, and a wrong answer. The OP is trying to design a DFDL model for a data format. That should have been explained in the question.
The answer to the question is in the DFDL specification, section 6.3.1.3:
http://www-01.ibm.com/support/knowledgecenter/SSMKHH_10.0.0/com.ibm.dfdl.spec.doc/dfdl_index.htm
Initiators,terminators and separators ( and a bunch of other properties ) are specified as 'DFDL string literals' which means that they describe one or more *literal* bytes or characters in the data.
You can specify
- a single space character using %SP;
- a single white space character using %WSP;
- one or more white space characters using %WSP*;
- zero or more white space characters using %WSP*;
Unfortunately, you cannot specify %SP+; or %SP*;. Those would probably be useful additions to the DFDL specification.
Summary: Best solution is probably MyTerminatorString%WSP*; _________________ Before you criticize someone, walk a mile in their shoes. That way you're a mile away, and you have their shoes too. |
|
Back to top |
|
 |
nelson |
Posted: Thu Jun 04, 2015 6:35 am Post subject: |
|
|
 Partisan
Joined: 02 Oct 2012 Posts: 313
|
kimbert wrote: |
Quote: |
Use space() function in esql |
A poor question, and a wrong answer. The OP is trying to design a DFDL model for a data format. That should have been explained in the question.
The answer to the question is in the DFDL specification, section 6.3.1.3:
http://www-01.ibm.com/support/knowledgecenter/SSMKHH_10.0.0/com.ibm.dfdl.spec.doc/dfdl_index.htm
Initiators,terminators and separators ( and a bunch of other properties ) are specified as 'DFDL string literals' which means that they describe one or more *literal* bytes or characters in the data.
You can specify
- a single space character using %SP;
- a single white space character using %WSP;
- one or more white space characters using %WSP*;
- zero or more white space characters using %WSP*;
Unfortunately, you cannot specify %SP+; or %SP*;. Those would probably be useful additions to the DFDL specification.
Summary: Best solution is probably MyTerminatorString%WSP*; |
Thanks kimbert. That works for me. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|