Working With Messages
Working With Messages
SC34-6039-01
WebSphere MQ Integrator
SC34-6039-01
Note!
Before using this information and the product it supports, be sure to read the general information under Appendix G,
“Notices” on page 265.
Chapter 12. The New Era of Networks | Appendix B. TDS Mnemonics . . . . 251
domains . . . . . . . . . . . . . 213
The NEONMSG domain. . . . . . . . . . 214 | Appendix C. DATETIME formats . . . 253
The NEONMSG message body parser . . . . 214 | DATETIME as STRING data . . . . . . . . 253
Setting up message flow nodes to handle | DATETIME as CWF BINARY data . . . . . . 256
NEONMSG messages . . . . . . . . . 216 | DATETIME as CWF encoded values. . . . . . 256
The NEON domain . . . . . . . . . . . 224 | DATETIME component defaults . . . . . . . 257
The NEON message body parser . . . . . . 224 | Message set defaults . . . . . . . . . . . 257
Setting up message flow nodes to handle NEON
messages . . . . . . . . . . . . . . 225
| Appendix D. Default TDS message set
Control Center support for New Era of Networks
messages . . . . . . . . . . . . . . . 227 | properties . . . . . . . . . . . . . 259
Bibliography . . . . . . . . . . . . 275
Part 6. Appendixes . . . . . . . . 233
WebSphere MQ Integrator Version 2.1
cross-platform publications . . . . . . . . . 275
Appendix A. Element definitions for WebSphere MQ Integrator Version 2.1
message parsers . . . . . . . . . . 235 platform-specific publications . . . . . . . . 275
Data types of fields and elements . . . . . . 236 MQSeries Everyplace publications . . . . . . 275
Data types of the fields in MQSeries headers 236 New Era of Networks Rules and Formatter
Data types for elements in the Properties folder 236 Support for WebSphere MQ Integrator publications 276
Data types for elements in the DestinationData Softcopy books . . . . . . . . . . . . . 276
folder . . . . . . . . . . . . . . . 236 Portable Document Format (PDF) . . . . . 276
Data types for elements in an MRM message 237 MQSeries information available on the Internet . . 277
Data types for an unstructured (BLOB) message 237
The MQCFH parser . . . . . . . . . . . 238 Index . . . . . . . . . . . . . . . 279
The MQCIH parser . . . . . . . . . . . 239
The MQDLH parser . . . . . . . . . . . 240
Sending your comments to IBM . . . 287
The MQIIH parser. . . . . . . . . . . . 241
The MQMD parser . . . . . . . . . . . 242
Contents v
vi WebSphere MQ Integrator Working with Messages
Figures
1. Message tree structure . . . . . . . . . 13 | 25. ACORD AL3 message basic structure 150
2. Example Environment tree structure . . . . 14 | 26. EDIFACT message high level structure 151
3. LocalEnvironment tree structure . . . . . 15 | 27. EDIFACT message display . . . . . . . 152
4. Example ExceptionList tree structure . . . . 17 28. Generated run time dictionary . . . . . . 181
5. Message and LocalEnvironment propagation 29. Example XML message document. . . . . 191
for an exception . . . . . . . . . . . 18 30. Example XML message syntax element tree 192
| 6. MRM processes in the Control Center, the 31. Example XMLDecl document . . . . . . 193
| Configuration Manager, and the broker . . . 24 32. Example XMLDecl tree structure . . . . . 193
| 7. The Message Sets view. . . . . . . . . 36 33. Example XML message body document 194
| 8. Message grouping within sets . . . . . . 42 34. Example XML message body tree structure 195
| 9. Elements and instantiations . . . . . . . 45 35. Example XML Entity reference document 195
| 10. Example message structure . . . . . . . 47 36. Example XML Entity reference tree structure 196
| 11. Messages defined in the Control Center 48 37. Example XML comment document . . . . 196
| 12. Structure of a compound type . . . . . . 50 38. Example XML comment tree structure 196
| 13. Valid children within a compound type 53 39. Example XML processing instruction
| 14. Messages within categories . . . . . . . 55 document . . . . . . . . . . . . . 196
| 15. Element qualification . . . . . . . . . 57 40. Example XML processing instruction tree
| 16. Messages within transactions . . . . . . 58 structure . . . . . . . . . . . . . 197
| 17. Example of an element value. . . . . . . 60 41. Example XML DTD document . . . . . . 202
| 18. MRM objects and their relationship to each 42. Example XML DTD tree structure . . . . . 202
| other . . . . . . . . . . . . . . . 63 43. Example XML IntSubset tree structures (Part
| 19. An example message . . . . . . . . . 67 1 of 3) . . . . . . . . . . . . . . 203
| 20. Example message tree . . . . . . . . . 68 44. Example XML IntSubset tree structures (Part
| 21. The Video Customer message . . . . . . 78 2 of 3) . . . . . . . . . . . . . . 204
| 22. Video customer example: tree structure created 45. Example XML IntSubset tree structures (Part
| by the parser . . . . . . . . . . . . 82 3 of 3) . . . . . . . . . . . . . . 205
| 23. Tags and special characters in a TDS message 132 46. Sample New Era of Networks input message 214
| 24. TDS and multipart messages . . . . . . 145 | 47. ISO8601 datetime examples . . . . . . . 255
For further information about the product, and planning for its use, refer to the
WebSphere MQ Integrator Introduction and Planning book.
If you want to define messages to the MRM, you must also have some knowledge
of the interface provided to the message repository by the Control Center. The
Control Center online help provides this information.
If you want to use generic XML or JMS messages, or both, you must have a basic
understanding of XML documents and Document Type Definitions (DTDs).
If you plan to use existing messages defined to the NEON and NEONMSG
domains through the New Era of Networks Rules and Formatter interfaces for
MQSeries® Integrator products, or to enhance or add to those messages, you must
have knowledge of these previous releases and the interfaces provided. For further
information, see “New Era of Networks Rules and Formatter Support for
WebSphere MQ Integrator publications” on page 276.
WebSphere MQ Integrator for z/OS™ also runs on OS/390® V2R8, V2R9, and
V2R10. All references in this book to z/OS are also applicable to these releases of
OS/390 unless otherwise stated. Customization and configuration differences
between the z/OS and OS/390 operating systems are transparent to the user.
All references in this book to Microsoft® Windows NT® are also applicable to
Windows® 2000 unless otherwise stated. WebSphere MQ Integrator components
that are installed and operated on Windows NT can also be installed and operated
on Windows 2000.
The term UNIX® is used throughout this book to refer to the operating systems
AIX®, HP-UX, and Solaris where their behavior is common.
The term distributed system is used to collectively refer to Windows NT and UNIX
where their behavior is common.
All new terms introduced in this book are defined in “Glossary of terms and
abbreviations” on page 269.
Chapter 2. Parsers . . . . . . . . . . . . 7
How a message is interpreted . . . . . . . . 7
Using the supplied input nodes and parsers . . . 8
MQSeries header parsers . . . . . . . . 8
Maintaining header integrity . . . . . . . 9
The Properties parser . . . . . . . . . 10
Using plug-in nodes and parsers . . . . . . 10
Message tree structures . . . . . . . . . . 11
Message tree . . . . . . . . . . . . . 12
Environment tree . . . . . . . . . . . 14
LocalEnvironment tree. . . . . . . . . . 14
ExceptionList tree . . . . . . . . . . . 16
Exception handling paths in a message flow 18
Depending on the type of message you are handling, you might also need to
know:
Message Set
v A collection of messages
v A central repository or dictionary of message definitions
v The message data associated with a business project
Message Type
v A value that uniquely identifies a message
Message Format
v A value that identifies a defined content and structure for a message
These messages are defined from scratch or imported using the Control
Center. The definitions are stored and managed in the message repository by
the Configuration Manager.
For more information, see Chapter 3, “The MRM domain” on page 23 and
Chapter 4, “The MRM logical message model” on page 35.
– Messages in the domains NEON and NEONMSG.
These messages must be defined using the New Era of Networks Formatter
user interface. They are stored in the New Era of Networks database, which
must be accessible by every broker to which message flows that access these
formats are deployed.
For more information, see Chapter 12, “The New Era of Networks domains”
on page 213.
v Self-defining. This group of messages carry the information about their
structure, content, and format with them. These messages are in either the JMS
or the XML domain.
For more information, see Chapter 10, “The XML domain” on page 191 and
Chapter 11, “The JMS domain” on page 209.
v Undefined. These messages are undefined in that their content and structure is
unknown. These messages are in the BLOB domain.
For more information, see Chapter 13, “The BLOB domain” on page 231.
You are very likely to find that your applications and business processes use a
combination of messages, including those defined by C and COBOL data structures
and by industry standards such as SWIFT, and those that are dynamic and
self-defining.
The broker and the message flows that provide message processing support all
these messages. You can therefore integrate applications that handle different types
of messages by providing message flows that perform the necessary
transformations to allow these applications to exchange messages successfully.
Chapter 1. Introduction 5
Supported message types
| A parser is a specialized program that reads input messages and constructs output
| messages. On input, it interprets the physical structure of the message and creates
| a logical structure in the form of a tree that is independent of the physical
| characteristics of the message. On output, it extracts the message data from the
| logical tree structure, and constructs the output message according to the physical
| characteristics that you have specified.
| The tree format (described in detail in “Message tree structures” on page 11)
| contains identical content to the bits from which it is created, but it is easier to
| manipulate within the message flow. The message flow nodes provide an interface
| (ESQL) for you to query and update message content within the tree, and facilities
| that help you to write the ESQL that you need to make your required changes. For
| more details about ESQL, refer to the WebSphere MQ Integrator ESQL Reference
| book.
The input node first calls the MQMD parser. A message can have zero or more
additional headers following the MQMD. The list of supported header parsers is
given in “MQSeries header parsers”.
| The broker calls the appropriate parser to interpret each additional header,
| following the order determined by the chaining of the headers. Each header is
| parsed independently. The fields within the header are parsed in a particular order
| that is governed by the parser. You cannot predict or rely on the order chosen.
When all the headers have been parsed, the message body is parsed. The input
node uses information in the message headers or specified in its own properties to
determine how the message body is parsed:
v If the message has an MQRFH or MQRFH2 header, the domain identified in the
header is used to decide which message parser is invoked.
v If the message does not have an MQRFH or MQRFH2 header, or the header
does not identify the domain, but the properties of the input node indicate the
domain of the message, the parser specified by the node property is invoked.
The parser specified can be a plug-in parser.
v If the message has a valid MQMD, but the message domain cannot be identified,
the message is handled as a binary object (BLOB). The BLOB parser is invoked.
If you set up the message headers or the input node properties of a supplied input
node to identify a plug-in parser, the way in which it interprets the message and
constructs the logical tree might differ from that described here.
For more information about the message header parsers, and their contents, refer
to Appendix A, “Element definitions for message parsers” on page 235.
Warning
No parser is provided for messages or parts of messages in format
MQFMT_IMS_VAR_STRING. Data in this format is often preceded by an MQIIH
header (format MQFMT_IMS). WebSphere MQ Integrator treats such data as a
BLOB. Therefore if you change the CodedCharSetId or the Encoding of such a
message in a message flow, the MQFMT_IMS_VAR_STRING data is not converted,
and the message descriptor or preceding header does not correctly describe
that part of the message. If you require data conversion of these messages to
be performed, you must define the message in the MRM, or provide a
plug-in parser.
| The broker completes this process to ensure that Format fields in headers correctly
| identify each part of the message. If it does not do this, MQSeries might be unable
| to deliver the message. Because the message body parser is not a recognized
| MQSeries header format, this is replaced in the last header’s Format field by the
| value MQFMT_NONE. The original value in that field is stored in the Domain
| field within the MQRFH or MQRFH2 header to retain the information about the
| contents of the message body. If there is no MQRFH or MQRFH2, the information
| is stored in the Properties folder (described in “The Properties parser” on page 10).
| For example, if the MQRFH2 header immediately precedes the message body and
| its Format field is set to XML, indicating that the message body must be parsed by
| the generic XML parser, the MQRFH2 Domain field is set to XML, and its Format
| field reset to MQFMT_NONE.
Chapter 2. Parsers 9
Interpreting a message
The Properties parser
All message trees generated by IBM supplied parsers include a properties folder
for the message. This folder is created and inserted in the tree following all the
headers but before the message data, as shown in Figure 1 on page 13.
The properties folder contains a set of standard properties that you can manipulate
in the message flow nodes in the same way as any other property. The majority of
these fields map to fields in the supported MQSeries headers, and are passed to
the appropriate parser when a message is delivered from one node to another.
For example, the MQRFH2 header contains information about the message set,
type, and format. These are stored in the Properties folder as MessageSet,
MessageType, and MessageFormat. If you intend to access these values using
ESQL within the message processing nodes, you should refer to these values in the
Properties folder, not directly to the fields in the headers from which they are
derived.
| If the message is converted to a bit stream, for example in an output node, any
| properties remaining solely in the Properties parser (that is, not in any header in
| the output messages) are not included in any part of the output message.
| The Properties parser ensures that the values in the header fields match the values
| in the Properties folder on input to, and output from, every node. On exit from a
| node, the Properties parser invokes each header parser with the values that it
| currently contains. It then requests values back from the header parser and
| updates its own values. Therefore if you have coded ESQL in the node that
| updates values either in the Properties folder, or in the header, or both, these
| values will always match when the tree is passed on from that node. However, if
| you have updated a field in both the Properties folder and the header with
| different values, you will find that the value that you set in the header has been
| overwritten by the value that you set in the Properties folder.
The standard properties are described in “Data types for elements in the Properties
folder” on page 236.
| This interface does not automatically generate a properties folder for a message
| (this folder is discussed in “The Properties parser”). It is not a requirement for a
| message to have a properties folder, although you might find it useful to create
| one to provide a consistent message tree structure regardless of input node. If you
| want a properties folder to be created in a message, and you are using a plug-in
| input node, you must do this yourself.
If you need to process messages that do not conform to any of the defined
message domains, you can use the C language programming interface to create a
new plug-in parser.
You must refer to the node interface to understand how it uses parsers, and if you
can configure it to modify its behavior. If the node uses a plug-in parser, the tree
The plug-in node and parser interfaces are described in the WebSphere MQ
Integrator Programming Guide.
The tree structure created by the parser is largely independent of any message
format (for example, XML), except for the subtrees that are created by the message
body parsers within the message tree. The format of the common tree is discussed
in this chapter. The format of the message body tree is message dependent.
Each of the four trees created has a root element (with a name that is specific to
each tree). A message tree is made up of a number of discrete pieces of information
called elements. The root element has no parent and no siblings (siblings are
elements that share a single parent). The root is parent to a number of child
elements. Each child must have a parent, it can have zero or more siblings, and it
can have zero or more children.
The four trees are created for both supplied and plug-in input nodes and parsers.
The input node passes the tree structure on to subsequent message processing
nodes in the message flow:
v All message processing nodes can read the four message trees.
v The Filter node and the nodes that provide database access (DataBase,
DataDelete, and so on) can modify only the Environment and LocalEnvironment
trees.
v The Compute node can modify the Environment, LocalEnvironment, and
Exception trees that it receives as input, and can pass these on to subsequent
nodes if it chooses. It can create a new output message tree, optionally using
information from the input message tree. It can pass on the original input
message tree, or a new output message tree. It can also create new output
LocalEnvironment and Exception trees.
| You must decide what input data is copied to an output message by the
| Compute node. When you configure the Compute node, you can request that
| the entire message tree is copied. However, if you want all or part of the
| LocalEnvironment or Exception input trees to be copied to the output trees, you
| must copy this data yourself using ESQL in the node, and you must amend the
| Compute Mode property of the Compute node to reflect your requirements.
If no exception occurs during processing of the message, the tree structure and
content received by an individual node is determined by the action of previous
nodes in the flow, as indicated above.
Chapter 2. Parsers 11
Message tree structures
If an exception does occur in the message flow, the content of the four trees
depends on several factors:
v If the exception is returned to the input node, and the input node catch terminal
is not connected, the trees are discarded. If the message is transactional, it is
returned to the input queue for further processing. When the message is
processed again, a new tree structure is created. If the message is not
transactional, it is discarded.
| v If the exception is returned to the input node and the catch terminal is
| connected, the Message, Environment, and LocalEnvironment trees that were
| created originally by the input node, and propagated through the out terminal,
| are restored, but any updates that you made to their content in the nodes that
| followed the input node are retained. If the nodes following the input node
| include a Compute node that creates a new LocalEnvironment or Message tree,
| those new trees are lost. The Exception tree reflects the one or more exceptions
| that have been recorded.
| v If the exception is caught within the message flow by a TryCatch node, the
| Message, Environment, and LocalEnvironment trees that were previously
| propagated through the try terminal of the TryCatch node are restored and
| propagated through the catch terminal. Any updates that you made to their
| content in the nodes that followed the TryCatch node are retained. If the nodes
| following the TryCatch node include a Compute node that creates a new
| LocalEnvironment or Message tree, those new trees are lost. The Exception tree
| reflects the one or more exceptions that have been recorded.
For more information about referring to the tree structures (using correlation
names), and creating or modifying their content, and for examples of these actions,
see WebSphere MQ Integrator ESQL Reference.
Message tree
The root of a message tree is called “Root”. The message tree is always present,
and is passed from node to node within a single instance of a message flow.
The message tree includes all the headers present in the message, in addition to
the message body. It also includes the Properties folder (described in “The
Properties parser” on page 10). This folder is always created as the first element of
the root of the message tree. It has relevance only while the message is being
processed by a WebSphere MQ Integrator message flow.
If a supplied parser has created the message tree, the Properties element is
followed by one or more headers, the first of which (therefore the second element)
must be the MQMD. If there are additional headers included in the message, these
appear in the tree in the same order as in the message. The last element beneath
the root of the message tree is always the message body.
If a plug-in parser has created the message tree, the Properties element, if present,
is followed by the message body.
The message tree created by the NEON and NEONMSG parsers does not conform
to the message tree described here: for details of the New Era of Networks domain
Root
Element1/Format1
Element2/Field2 Element3/Field3
Figure 1. Message tree structure. This has been created by a supplied input node and parser
(indicated by the presence of the MQMD). A reference to Element2 would therefore be
Root.XML.Element1.Element2 or Body.Element1.Element2.
Each element within the parsed tree can be one of three types:
Name element A name element has a string associated with it,
which is the name of the element. An example of a
name element is XMLElement, described in
“Element” on page 194.
Value element A value element has a value associated with it. An
example of a value element is XMLContent,
described in “Content” on page 194.
Name-value element A name-value element is an optimization of the
case where a name element contains only a value
element and nothing else. The element contains
both a name and a value. An example of a
name-value element is XMLAttribute, described in
“Attribute” on page 194.
For more information about referring to elements in this tree, see “Using ESQL to
manipulate the message tree” on page 69 and the WebSphere MQ Integrator ESQL
Reference book.
Chapter 2. Parsers 13
Environment tree
Environment tree
The root of the Environment tree is called “Environment”. This tree is always
present in the input message: an empty Environment tree is created when a
message is received and parsed by the input node. It has no structure or content
until and unless you populate it using ESQL statements to define that structure
and content. Its content, if any, is not referenced or acted upon by WebSphere MQ
Integrator. This is in contrast to the LocalEnvironment tree (described in
“LocalEnvironment tree”), parts of which are used by WebSphere MQ Integrator.
Figure 2 shows an example of an Environment tree, and the ESQL statements that
you might use to create the tree.
Environment
Variables
name currency
SET Environment.Variables =
ROW(’granary’ AS bread, ’reisling’ AS wine, ’stilton’ AS cheese);
SET Environment.Variables.Colors[] =
LIST{’yellow’, ’green’, ’blue’, ’red’, ’black’};
SET Environment.Variables.Country[] = LIST{ROW(’UK’ AS name, ’pound’ AS currency),
ROW(’USA’ AS name, ’dollar’ AS currency)};
LocalEnvironment tree
The root of the LocalEnvironment1 tree is called “LocalEnvironment”. This tree is
always present in the input message: an empty LocalEnvironment tree is created
when a message is received by the input node and parsed.
You can use the LocalEnvironment tree to store variables that can be referenced
and updated by message processing nodes that occur later in the message flow.
You can also use the LocalEnvironment tree to define destinations (that are internal
and external to the message flow) to which a message can be sent.
1. LocalEnvironment was known as DestinationList in earlier releases of MQSeries Integrator. You can use these two names
interchangeably.
LocalEnvironment
MQ MQDestinationList RouterList
Figure 3. LocalEnvironment tree structure. This has been created by an IBM supplied input
node and parser, not a plug-in node and parser, asindicated by the structure of the
Destination element.
Chapter 2. Parsers 15
LocalEnvironment tree
If you prefer, you can configure the output node to send messages to a
single fixed destination, by setting the property Destination Mode to Queue
Name or to Reply To Queue. If you select either of these fixed options, the
destination list has no effect on broker operations and you do not have to
create this folder.
If you choose to set up a destination list, and the transport protocol is
MQSeries, MQ and MQDestinationList can both be used to contain
information for MQSeries destinations. MQDestinationList was available in
MQSeries Integrator Version 2.0, Version 2.0.1, and Version 2.0.2, from
which you can migrate to this product. It is still supported, but you are
recommended to use MQ for all new message processing. The two names
are not true aliases: whichever you choose to use, every reference to the
element must be to the same name.
You can construct the MQ (and MQDestinationList) elements to contain a
single optional Defaults element. The Defaults element, if created, must be
the first child and must contain a set of name-value elements that give
default values for the message destination and its PUT options for that
parent.
You can also create a number of elements called DestinationData within
MQ. Each of these can be set up with a set of name-value elements that
defines a message destination and its PUT options. The set of elements that
define a destination is described in “Data types for elements in the
DestinationData folder” on page 236.
RouterList has a single child element called DestinationData, which has a
single entry called labelName. If you are using a dynamic routing scenario
involving the RouteToLabel and Label nodes, you must set up the
Destination folder with a RouterList that contains the reference labels.
WebSphere MQ Integrator Using the Control Center illustrates how you can
use these nodes and the RouterList to provide dynamic routing.
WrittenDestination
This folder contains the addresses to which the message has been written.
Its name is fixed. It is created by the message flow when a message is
propagated through the out terminal of an output node. It includes
transport specific information (for example, if the output message has been
put to an MQSeries queue, it includes the queue manager and queue
names). If the out terminal of the output node it not connected to another
node, this folder is not created.
ExceptionList tree
The root of the ExceptionList tree is called “ExceptionList”, and the tree itself
consists of a set of zero or more exception descriptions. The ExceptionList tree is
populated by the message flow if an exception occurs. If no exception conditions
occur during message flow processing, the exception list associated with that
message consists of a root element only. This is, in effect, an empty list of
exceptions.
The ExceptionList tree can be accessed by other nodes within the message flow
that receive the message after the exception has occurred. It can be modified only
by the Compute node.
ExceptionList
RecoverableException
Recoverable
File Line Function Type Name Label Text Catalog Severity Number Exception (1)
Insert Recoverable
File Line Function Type Name Label Text Catalog Severity Number (2) Exception (3)
Type Text
The exception description structure can be both repeated and nested to produce an
ExceptionList tree. In this tree:
v The depth (that is, the number of parent-child steps from the root) represents
increasingly detailed information for the same exception.
v The width of the tree represents the number of separate exception conditions
that occurred before processing was abandoned. This number is usually one, and
results in an exception tree that consists of a number of exception descriptions
connected as children of each other.
v At the numbered points in Figure 4:
1. This child can be one of “RecoverableException”, “ParserException”,
“DatabaseException”, “UserException”, or “ConversionException”. All of
these have the children shown: if present, the last child is the same element
as its parent.
2. This element might be repeated.
3. If present, this child contains the same children as its own parent.
Chapter 2. Parsers 17
ExceptionList tree
For examples of all these types of exception list tree, see the WebSphere MQ
Integrator ESQL Reference book.
The children in the tree take the form of a number of name-value elements that
give details of the exception, and zero or more name elements whose name is
“Insert”. The NLS (National Language Support) message number identified in a
name-value element in turn identifies a WebSphere MQ Integrator error message.
All error messages are defined in detail in the WebSphere MQ Integrator Messages
book. The Insert values are used to replace the variables within this message and
provide further detail of the precise cause of the exception.
The name-value elements within the exception list (shown in Figure 4 on page 17)
are described in Table 1 on page 19.
The LocalEnvironment and message tree that are propagated to the exception
handling message flow path are those at the start of the exception path, not those
at the point when the exception is thrown. Figure 5 illustrates this point:
v A message (M1) and LocalEnvironment (L1) are being processed by a message
flow. They are passed through the TryCatch node to Compute1.
v Compute1 updates the message and LocalEnvironment and propagates a new
message (M2) and LocalEnvironment (L2) to the next node, Compute2.
v An exception is thrown in Compute2. If the failure terminal of Compute2 is not
connected (point B), the exception is propagated back to the TryCatch node, but
the message and LocalEnvironment are not. Therefore the exception handling
path starting at point A has access to the first message and LocalEnvironment,
M1 and L1. The Environment tree is also available and retains the content it had
when the exception occurred.
v If the failure terminal of Compute2 is connected (point B), the message and
LocalEnvironment M2 and L2 are propagated to the node connected to that
failure terminal. The Environment tree is also available and retains the content it
had when the exception occurred.
Chapter 2. Parsers 19
ExceptionList tree
Message
Repository
|
| Figure 6. MRM processes in the Control Center, the Configuration Manager, and the broker
|
| You can use the Control Center interface to the MRM modeler to help you to
| model the messages that you want WebSphere MQ Integrator to handle. When you
| check in a message definition that you have created in the Control Center, it is
| stored in the message repository by the Configuration Manager.
| The Control Center interacts with the Configuration Manager to provide some
| checks that your model is valid, and to store the model safely in the message
| repository from where it is accessible by users of the Control Center. The
| Configuration Manager can protect the message model both by checking the
| authorization of users that want to access it, and by providing locking mechanisms
| that prevent different users making conflicting updates.
| When you assign a message set that contains a set of one or more related messages
| to a broker, and deploy that assignment, the definitions saved in the message
| repository are retrieved and sent to the broker in the form of a message dictionary.
| A dictionary describes the message model associated with the message set. MRM
| message sets are the only type of message sets that can be deployed from the
| Control Center.
| You do not have to deploy New Era of Networks messages to a broker, but you
| must ensure that their definition is available to the broker. Refer to the WebSphere
| MQ Integrator Administration Guide for information about how to do this.
| All the other types of message set (XML, JMSMap, and JMSStream) do not
| generate a dictionary to describe the message set because the messages are treated
| by the broker as self-defining.
| The MRM parser uses the dictionary to interpret the data within the incoming
| message, and produces a tree structure to represent the message. The tree structure
| is the broker’s view of the logical message model. The message tree is independent
| of its physical representation. You can manipulate the contents of the tree in the
| nodes within a message flow, to add new business data or to alter existing
| business data, or both.
| For example, the input message might be in XML format, and the output message
| might be a fixed format COBOL structure. Or both input and output messages
| might be in XML format, but with the contents constructed differently. The
| definitions within the dictionary or dictionaries enable the parser to parse the one
| and construct the other, thus providing a different physical representation of the
| message data. This ability is a powerful facility that saves the message designer a
| considerable amount of coding effort.
| The MRM therefore allows you to make a clear separation between the logical
| representation of a message and the physical representation, and you can use the
| model of the data to interpret and to construct different physical representations.
| The chapter concludes with the section “Planning your MRM model” on page 32
| that addresses the common questions that you might have about how you can plan
| for message modeling.
| The logical model defines the structure and order of the message. In the following
| example, the three elements are based on the simple type INTEGER, and C follows
| B follows A:
| int A;
| int B;
| int C;
| The CWF physical representation of this model indicates the number of bits that
| each integer takes up. An int element maps to CWF physical type INTEGER, and
| its length can be 1, 2, or 4 bytes.
| where xxxxxxxx is the value of the integer represented as a string. (XML deals only
| with strings.)
| This shows that the logical model is unchanged. It is constant, regardless of the
| physical representation that you choose to model on top of it, using the wire
| format layers provided by the MRM. The MRM parser is able to transform the
| message from the input physical representation (which it parses to create an
| internal, physically independent tree) to any number of output representations that
| it constructs from this internal tree, based on the wire format layers that you have
| defined.
| The MQRFH or MQRFH2 header always takes precedence, if one is included in the
| message.
| Within the MRM, the logical message model is built up of at least the following
| entities:
| Message set
| A message set is a logical grouping of messages. When you have
| completed the definition of a message set, you can assign and deploy it to
| a WebSphere MQ Integrator broker. You cannot deploy at a more granular
| level, for example, by message.
| Message
| A message is a logical model that is built up of types and elements.
| Type A type can be simple type or compound type:
| v A simple type is one of seven core types that are supplied by the MRM
| to cover the basic data types. These include INTEGER and STRING. All
| seven types are described in Table 7 on page 49.
| v A compound type is one that you have defined yourself. It is used to
| represent groups of elements and types that create a substructure within
| a message. A message is always based on a single compound type, in
| effect the highest level (in COBOL, the ’01’ level) in the message.
| There are other constructs in the model: the list above describes the minimum set
| of entities that you must include to build a valid logical model that you can deploy
| to the broker. Detailed information about these and the additional constructs are
| provided in “Message model objects” on page 39.
| The logical message model is displayed in the Message Sets view in the Control
| Center. If you select an MRM entity from the message set tree in the left pane, for
| example an element, the logical message model properties for that entity are
| displayed in the right pane.
| You can modify these defaults for documentation purposes by updating the
| properties on the Connection pane for compound types and elements (see “Type”
| on page 49 and “Element” on page 45). However, these properties, and the
| conditions they define, are not enforced by the broker.
| You can model these constraints in the MRM using element values. You can add an
| element value to an element (or to an element qualifier) to specify the nature of the
| restriction. For example, you can define a maximum length for an element of type
| STRING. If you associate an element value with an element, a Connection pane is
| added to the element properties pane that defines the constraints in force. This is
| explained further in Chapter 4, “The MRM logical message model” on page 35.
| The exceptions to this are maximum length (which is enforced), whether nulls are
| permitted, and the use of the default value for CWF.
| You can add multiple CWF, TDS, and XML wire format layers to a single message
| set. This allows you to define multiple physical representations of a single logical
| message to enable conversion from one format to another to be done by the broker.
2. You might see PDF error codes included in error messages and log information associated with internal messages. For an
explanation of these error codes, see Appendix F, “PDF error codes” on page 263.
You must make the files that are generated accessible to your applications: this is
not done automatically. You cannot assign run time dictionaries to brokers
through the Control Center.
“Generating run time dictionaries” on page 180 details the process for generating
these files.
v Documentation. You can generate a glossary and a message book from a
message set. The files created by this action are for documentation purposes
only to record the contents of the message set. You might find this useful to
provide reference information for your message flow designers and application
developers.
“Generating documentation” on page 178 provides instructions for this process.
v Language bindings. You can create language bindings for both C and COBOL.
The files generated by this action are the C headers or COBOL copybooks that
represent the data structures that you have created in the message repository.
See “Generating language bindings” on page 179 for instructions on how to
complete this task.
| v DTDs. You can generate an XML Document Type Definition (DTD) file from the
| message set within the message repository. This is described in “Generating
| MRM message set definitions in XML DTDs” on page 181.
v Message set definitions. You can export a message set definition from the
message repository using the message set export command mqsiimpexpmsgset.
This command generates a file in XML format that can be imported into another
Configuration Manager. The command is described in the WebSphere MQ
Integrator Administration Guide. This function is not available through the Control
Center.
The questions that you might consider in reaching your decisions include the
following:
v Are the messages brand new, or based on existing message definitions?
– You can import existing MRM message set definitions. For example, if you
can reuse a message set and its contents from another broker domain, you
can export the message set definition from that domain, and import it into
this domain.
Details of importing and exporting message sets are described in “Importing
a message model from external sources” on page 30.
– You can build messages based on existing C or COBOL data structures, by
creating a message set and importing the data structures into that message set
using options in the Message Sets view of the Control Center. You can only
import one data structure at a time. You must then complete the definition of
the messages using the types and elements created for you within the MRM
by the import action.
Details of importing and exporting C and COBOL data structures are
provided in “Importing C and COBOL data structures” on page 176 and
“Generating language bindings” on page 179.
– You can build messages based on DTDs, by creating a message set and
importing a DTD into that message set using options in the Message Sets
view of the Control Center. See “Importing a DTD” on page 177 for further
details.
– You can create new message sets by defining all the required components
yourself.
v What physical representations do the messages need?
You can add any combination (including none) of the following:
– The Custom Wire Format (CWF). This is generally used when you are
creating your message set from existing C or COBOL datastructures that you
have imported.
– The Tagged Delimited String Wire Format (TDS). You must use this
representation when you are dealing with tagged or delimited messages,
including industry standards. The Control Center specifically supports the
following TDS industry standard formats:
- ACORD AL3. These messages are used by insurance companies,
predominantly in the USA.
- EDIFACT and X12. These messages are used by the travel industry and by
some insurance establishments, particularly in Europe.
- SWIFT. These messages are widely used in the finance industry to define
messages for transactions and exchange.
You can also define your own tagged or delimited formats if you choose.
| – The XML Wire Format (XML). You must use this representation when you
| want the MRM to parse an inbound XML message, or generate an outbound
| XML message.
If an inbound message has TDS wire format, and you want the outbound
message to be in XML format, you can add and complete the appropriate wire
format tabs. You might also want to convert from one tagged format (SWIFT, for
example) to another tagged format (EDIFACT perhaps). The ability to add wire
formats to your message set allows you to support your applications, whatever
the combination of formats they use.
If you do not add any of these wire formats to your message set, the broker
processes the message as a PDF (Portable Data Format) message (used internally
by the MRM).
Wire formats are discussed in detail in Chapter 5, “Working with a Custom Wire
Format layer” on page 83, Chapter 6, “Working with an XML Format layer” on
page 111, and Chapter 7, “Working with Tagged Delimited String messages” on
page 131.
v Do the messages need language bindings?
You can add language bindings to the message set for C or COBOL, or both.
Language bindings are used for exporting headers and datastructures.
For further information, see “Adding a language binding” on page 162.
v How can messages be organized?
You must create messages within a message set to enable their deployment to a
broker. You can deploy as many message sets to a broker as necessary. Therefore
you must decide the grouping of messages within a message set.
You can choose to put all messages that are used by all applications that access a
single broker into a single message set, and deploy that one message set to the
broker. You might define all the messages used by one application suite in a
message set. You can choose to put individual messages in a message set. You
can also use categories and transactions within the message set to organize the
messages it contains.
You must consider that you can only import and export message sets, you
cannot import or export a single message. Therefore you might want to limit the
size of your message sets to ensure the most efficient distribution of the required
messages around your enterprise.
It is also important to consider that you can only finalize at the message set
level. When you finalize a message set, the MRM prohibits further updates to
that message set. You might want to introduce this level of completeness in
small increments by limiting the contents of each message set.
See “Message set states” on page 76 for further explanation of this topic.
v What naming conventions are used in the business environment?
The larger your enterprise and your application set, the more important it is to
follow naming conventions for resources that are shared between users and
systems. This is true for your message sets in the MRM. Within a message set,
the MRM controls the required uniqueness of names, but it is your responsibility
to ensure that everything you define has a representative name.
| In the final section, you can review the process for creating a logical message
| model. The example used is for a message set that defines the messages used by a
| video loan company. This example is further explored in the following three
| chapters, in which wire formats are created for each of the physical representations
| in which the video messages can be received.
You can include other optional components to enhance your message model:
v Category
v Element qualifier
v Transaction
v Element value
This section takes a first look at the message set in the Control Center, and
summarises how to create your first message model. All the information in this
section is expanded later in this chapter.
v “The message set in the Control Center”
v “How to create a logical message model” on page 37
You can see the structure of a message set in Figure 7. The message set, VideoStore,
is used as a working example later in this chapter (in “Example: modeling the
Video customer message” on page 78), and in the following three chapters.
|
| Figure 7. The Message Sets view
Additional tabs might be visible in the right pane. In Figure 7 on page 36, you
can see four additional tabs, Run Time, XML, TDS, and CWF. These do not
define the logical model, but provide addditional information that relates to the
physical representations of the model. For further details about these tabs, see
“Message set” on page 41.
The characteristics of each object, the properties that you can configure to define
each one, and the additional panes that might be displayed for the object, are
described in detail in “Message model objects” on page 39. You can also read about
the relationships between the objects, and view examples.
| You create messages from reusable items that are defined as types and elements.
| You can consider a type as a library or generic part, an object that has no business
| meaning. It cannot be accessed by name using ESQL in a node within a message
| flow. It is merely a building block. When you instantiate a type as an element, you
| give it a meaning and context. You also give it an identifier, that you can use to
| access it from a message flow node.
| To illustrate types and elements, consider data that represents an address. You can
| create a type called Address, that defines a structure containing two strings, the
| first for a street, the second a town. The Address on its own has no context. Now
| create two elements, called CompanyAddress and CustomerAddress, and base
| both on the type Address. The two elements are different instantiations of the same
| type. That is, each element has a different meaning, context, and content, but the
| structure and characteristics of the elements is identical.
| Types and elements are reusable within the message set. You can use these in more
| than one message within the same message set, but you cannot use them across
| message sets. You can make a copy of an object from one message set to another. If
| you do so, the two are not linked, and updates that you make to one copy are
| never reflected in the other copy.
| You can create messages to suit many situations using the objects that have been
| described. This section first discusses a simple message, then explores that ways in
| which you can enhance the first message to fulfil more complex requirements.
| Each section introduces some of the properties of the components that it includes:
| check “Message model objects” on page 39 for details of these properties.
| Next, you create one or more types to represent the structures within the message.
| The types that you create are the compound types, which represent groups of
| elements in a particular order. When you have created a type, you must add the
| simple elements to it.
| If you have a hierarchy of structures, you can now create compound elements, that
| is, elements that represent structures. You do this by defining an element based on
| a compound type rather than on a simple type.
| You must create a compound type to represent the whole message. This compound
| type can contain any number of simple and compound elements. Now you can
| create the message based on this compound type.
| You can also use the Message SmartGuide to create a message. For more
| information about this utility, see “Using the SmartGuides” on page 168.
| This option is particularly useful when you are modeling an XML message, in
| which case you must also add an XML wire format layer to the message set (refer
| to Chapter 6, “Working with an XML Format layer” on page 111 for further details).
| You can also define messages that include a choice of elements within a message:
| at a particular point in the message, the next element could be one of a number of
| elements, resolved only when the message is received and analyzed. To achieve
| this, you must define the compound type with its Type Composition property set to
| Choice.
| When you create a multipart message, you cannot base it on a compound type that
| is itself defined with Type Composition set to Message.
| Each wire format (CWF, XML, and TDS) has ways of identifying embedded
| messages. For further information, see Chapter 5, “Working with a Custom Wire
The tabs that appear in the Properties pane in the Control Center when you select
an object in the tree in the Message sets pane might differ depending on the point
in the tree from which you select it. For example, if you select an element within
the Elements folder, no Connection pane is displayed. If you select the same
element in the Messages folder, you see a Connection pane that shows the
properties that exist due to the member of relationship that you have created by
including the element within the message. Not all MRM objects have a Connection
pane because not all MRM objects are associated with a member of relationship.
(Relationships between objects are discussed in “Relationships between MRM
objects” on page 62.)
Every object has a Description pane that is used for documentation only, and this
is not listed in the following sections. For a description of this pane, see “Creating
a logical message model: an overview” on page 35. Some objects also have a
History pane that provides additional properties that are also used for
documentation only. The History pane is listed where it appears.
| Prefixed identifiers
| You might find that some of the messages that you want to model contain different
| elements that have a common name. This would usually be the case where the
| elements are included in two different types and represent different data. Another
| example is modeling an XML message where XML attributes frequently have the
| same name. In both cases, the elements might or might not have similar content.
| For example, your message might contain a type called A and another called B.
| Both types contain an element called X. The two elements called X are very
| different and must not be confused when the message is processed. Each element X
| can be considered local to the type in which it is defined, and has meaning only in
| that local context.
| When you model this message, you could define the two elements with the same
| name but you must give the identifiers unique values. You can model this in two
| different ways:
| 1. You can modify the identifier of the second element X. You can do this perhaps
| by setting an identifier of X for the first element, and X1 for the second element.
| Or you could use the element’s parent to provide the distinction, perhaps
| setting an identifier of A_X for the first, and B_X for the second.
| You must follow the following rules that are associated with prefixed
| identifiers:
| a. You can only use prefixed identifiers for MRM-defined elements
| b. You cannot create a compound type that contains two elements that have
| identifiers that differ only by prefix, that is you cannot have two variations
| of the same local name within a single type.
| c. You can specify only a single caret in an identifier.
| d. You must avoid using a fully prefixed identifier when you enter your own
| ESQL (not using drag and drop). Just use the suffix. If you do not do so, the
| ESQL reference might fail to match to the correct field in the message.
| Use this method of defining identifiers for local elements in all situations where
| duplicates names exist.
| Message set
| A message set is a logical grouping of messages. Its characteristics are:
| v A message set is the MRM’s largest container object.
| v A message set defines the namespace of the identifiers. A single namespace is
| created for each message set.
| v You cannot share entities, for example elements, between message sets. You can
| copy entities from one message set to another.
| When you have completed a message set definition, you can assign and deploy it
| to a broker. You cannot deploy at a more granular level (for example, a message).
| Figure 8 on page 42 shows two message sets that are defined for a banking
| application. The first message set contains two messages that handle information
| about checking accounts (the message set name, CHECK_ACC_MSGSET, implies
| its purpose), and the second, SAVE_ACC_MSGSET, contains two messages
| concerned with savings accounts.
|
CHECK_ACC_MSGSET
SAVE_ACC_MSGSET
|
| Figure 8. Message grouping within sets
| When you have finalized a message set, you cannot change it or any of its
| components.
| Freeze DATETIME This property is initially empty, which indicates that you have not frozen the
| Timestamp message set. You cannot change this property on this pane, but its value
| changes to the date and time at which you freeze the message set (see
| “Managing message sets” on page 76 for further information).
| After you have frozen the message set, the Freeze Timestamp is always stored
| by the Configuration Manager in UTC (coordinated universal time), but it is
| displayed in a locale-dependent format and local time, for example 26 JUNE
| 2001 11:53:09 BST.
| Default Wire Enumerated Type Specify the default wire format that is used if a format cannot be deduced
| Format from the message’s MQRFH2 header, or was not specified as a property of
| the input node on which the message is received by a message flow. The
| default is empty (not set).
| Default Null Enumerated Type Select Yes or No (the default) from the drop-down list.
| Permitted
| If you select Yes, any element within the message set can contain values that
| are defined as MRM null values, unless the element has an associated
| element value constraint of role Null Permitted that is set to the Boolean
| False value.
| If you select No, if an element is to contain an MRM supplied null value, that
| element must have an element value constraint of role Null Permitted set to
| the Boolean True value.
| This property is used in combination with the Default Permitted role for an
| element value. See “Element value member properties” on page 61 for further
| information about this role.
| The value that you specify is used as an absolute or relative path to the
| innermost message from the outermost, and is used as a prefix to the value of
| the Message Type property specified for the outermost message (specified
| either in the MQRFH2 header of the message, or in the input node of the
| message flow).
| If you set a value, it must be in the form id1/id2/.../idn where id1 is the
| identifier of the outermost message, id2 is the identifier of the next element
| or message, and idn is the identifier of the innermost message. The default
| value is blank (not set).
| Table 3 shows how this value is combined with the Message Type property of
| an input message.
| Base Message STRING When you create a message set, you can base it on another existing finalized
| Set message set if you choose. You can choose from a list of finalized message
| sets displayed in the dialog. After creation, this property displays the
| identifier (not the name) of the message set on which it is based. If the
| message set is not based on another message set, this field is empty (not set).
|
| Table 3 shows the implications of using the property Message Type Prefix. Note that
| identifiers might be elements or messages.
| Table 3. Use of the message set property Message Type Prefix
| Message Type property Message Type Prefix not set Message Type Prefix set
| example
| Simple Message Type: Results in the simple Message Type: Results in the path Message Type:
| id id /idP1/.../idPn/id
| Path Message Type: Results in the path Message Type: Results in the combined path Message
| id1/.../idm /id1/.../idm Type:
| /idP1.../idPn/id1/.../idm
| Simple absolute Message Results in the simple Message Type: Results in the simple Message Type:
| Type: id id
| /id
| An error is raised if Message Type Prefix is
| set to any value other than id.
| Path absolute Message Type: Results in the path Message Type: Results in the path Message Type:
| /id1/.../idm /id1/.../idm /id1/.../idm
| The message set does not have any properties that are dictated by membership of
| a larger entity, because this is the largest entity defined by the MRM.
|
| Figure 9. Elements and instantiations
| A suspended element does not appear in extracted documentation. You cannot add
| suspended elements to messages, types, or qualifiers. You can add an element
| value to a suspended element.
| You cannot create an object in the suspended state. If you want to suspend an
| object, you must check in the newly created object, and check it out again to make
| this update.
| Type Enumerated Specify the name of the compound type or simple type on which this element is
| Type based. You cannot change this after you have created the element.
|
| An additional pane is displayed for each wire format layer that you add to the
| message set. For details of their content, see Chapter 5, “Working with a Custom
| Wire Format layer” on page 83, Chapter 6, “Working with an XML Format layer”
| on page 111, and Chapter 7, “Working with Tagged Delimited String messages” on
| page 131.
| Table 5. General element member properties on the Connection pane
| Property Type Meaning
| Repeat BOOLEAN You can set this to Yes (if the compound type includes one or more repeating
| elements) or No (if it does not).
| Min Occurs INTEGER Specify the minimum number of times that the object within the compound type
| can repeat. This property is only valid if you have set Repeat to Yes.
| Max Occurs INTEGER Specify the maximum number of times that the object within the compound type
| can repeat. This property is only valid if you have set Repeat to Yes.
references
TOP_COMPOUND_TYPE
(compound type)
|
| Figure 10. Example message structure
| Figure 11 on page 48 shows the way in which the message in the VideoStore
| message set is constructed in the Control Center. The message Customer is defined
| on the compound type CustomerType (this is identified in the property Type that
| you can see in the general properties pane for the message that is highlighed in the
| left pane). The tree structure on the left has been expanded so that you can see the
| full structure within the message. For further details about this message, see
| “Example: modeling the Video customer message” on page 78.
|
| Figure 11. Messages defined in the Control Center
Message properties
Table 6 defines the properties that you can set to customize the message.
Table 6. General message properties
Property Type Meaning
Name STRING Specify a name for the message when you create it.
| Identifier STRING Specify an identifier for the message when you create it.
| Suspended BOOLEAN Select Yes or No from the drop-down list. You can consider suspend as a soft
| from Use delete.
| You cannot create an object in the suspended state. If you want to suspend an
| object, you must check in the newly created object, and check it out again to make
| this update.
| Type Enumerated Set this property to the name of the compound type that defines the structure for
| Type this message by selecting a type from the list displayed. You cannot change the
| type of a message after you have created it and checked it in.
| Mode This is set to null and you cannot change it. This property is reserved for future
| use.
|
|
| Figure 12. Structure of a compound type
| You cannot create an object in the suspended state. If you want to suspend
| an object, you must check in the newly created object, and check it out
| again to make this update.
| The default value is null (which means that the compound type has no
| value).
| You cannot change this property after you have created the compound
| type.
| Type Composition: The Type Composition property describes how the message tree
| is structured, and is used in combination with the property Type Content. The valid
| combinations and the structure that they model is shown in Table 12 on page 53.
| Type Composition determines, for example, if the elements within the tree can
| appear in any order, or if the order is predefined.
| If you include a compound type within another compound type, you must set Type
| Composition for the enclosing compound type to Sequence.
| If you set this property to Ordered Set or Sequence, the order of elements in the
| input message when the message is parsed, and the order in the logical tree when
| the output message is constructed by the parser, is important. If the order is not
| correct, the parser might generate an error, or might produce unexpected results.
| Therefore you must take care to include ESQL SET statements in the correct order
| when you create a message in a Compute node.
| For further information about the effect of using this property with CWF, see
| “Type property Type Composition” on page 107.
| Table 9 on page 52 shows the valid settings for Type Composition. Valid children in a
| compound type, that depend on both Type Composition and Type Content, are shown
| in Table 12 on page 53. Valid combinations of repeated and duplicate elements, also
| dependent on Type Composition, are shown in Table 13 on page 54.
| Use this option if you want to model C unions and COBOL REDEFINES (see Chapter 5,
| “Working with a Custom Wire Format layer” on page 83), or an XML DTD element that
| uses choice (see Chapter 6, “Working with an XML Format layer” on page 111). Some
| industry standard tagged/delimited messages (for example SWIFT) use this format (see
| Chapter 7, “Working with Tagged Delimited String messages” on page 131).
| Unordered Set If you select this option, you can define only elements as children. The elements can
| repeat but cannot be duplicated. Child elements can appear in any order.
| If you have migrated messages from WebSphere MQ Integrator Version 2.0, Version 2.0.1,
| and Version 2.0.2, this is the default value set for these message sets.
| Ordered Set If you select this option, you can define only elements as children. These elements, if
| present, must appear in the specified order, and they can repeat but cannot be
| duplicated. This is the default value for new compound types.
| Sequence If you select this option, you can only define children that are simple types, compound
| types, or elements. These children, if present, must appear in the specified order. They
| can repeat and can be duplicated.
| Simple Unordered Set If you select this option, you can define only elements that are based on simple types as
| children. Child elements can be in any order but cannot repeat and cannot be duplicated.
| Use this option to model an XML DTD attribute list declaration.
| Message If you select this option, you can define only messages as children. They can repeat, but
| they cannot be duplicated. Like Choice, only one of the defined children can be present.
| Use this option to model multipart messages, which are used in some industry
| standards, for example, SWIFT. For more information, see the section on multipart
| messages in Chapter 5, “Working with a Custom Wire Format layer” on page 83,
| Chapter 6, “Working with an XML Format layer” on page 111, and Chapter 7, “Working
| with Tagged Delimited String messages” on page 131.
|
| Type Content: Type Content specifies where the objects that are included within
| the compound type are defined, if at all. It is used in combination with Type
| Composition, and valid combinations are shown in Table 12 on page 53. This
| property is not validated by the broker.
| Table 10 shows the valid settings for Type Content if Type Composition is set to
| Message, and Table 11 on page 53 shows the valid settings for Type Content if Type
| Composition is not set to Message.
| Table 10. Compound type Type Content options if Type Composition is set to Message
| Option Meaning
| Open When a message is parsed, this compound type can contain any message, not just those that you
| have defined in this message set. You can use this option for sparse messages (see “Predefined
| and self-defining elements and messages” on page 63 for a definition of sparse messages).
| Closed When a message is parsed, this compound type can only contain the messages that are members
| of this compound type. This is always the case for messages represented in CWF format.
| Open Defined When a message is parsed, this compound type can contain any message defined within the
| message set.
|
| Combinations of Type Composition and Type Content: Figure 13 shows the objects
| that you can use within a compound type definition. Table 12 shows how the
| choices that you make are affected by the settings you choose for the Type
| Composition and Type Content properties.
|
|
Compound type
Compound Simple
type Element type
|
| Figure 13. Valid children within a compound type
| Table 12. Valid children in compound types dependent on Type Composition and Type Content
| Type Composition Type Content Valid children
| Empty Closed None
| Empty Open None
| Empty Open Defined None
| Choice Closed Elements, simple types, compound types
| Unordered Set Open Elements
| Unordered Set Closed Elements
| Unordered Set Open Defined Elements
| Ordered Set Open Elements
| Ordered Set Closed Elements
| Ordered Set Open Defined Elements
| Sequence Open Elements, simple types, compound types
| Sequence Closed Elements, simple types, compound types
| Sequence Open Defined Elements, simple types, and compound types
| Simple Unordered Set Open Elements based on a simple type
| Simple Unordered Set Closed Elements based on a simple type
| Simple Unordered Set Open Defined Elements based on a simple type
| Message Open Messages
| Repeats and duplicates: Table 13 defines the valid combinations of repeated and
| duplicate elements within a compound type, dependent on the Type Composition
| property value.
| v A repeated element is an element that is included once within the compound
| type, and is defined with the property Repeat set to Yes (on the Connection
| pane). Repeated elements are therefore always contiguous and are always
| specified in the form A[n].
| v A duplicate element is an element included more than once anywhere within the
| compound type. Duplicate elements do not have to be contiguous.
| Figure 14 shows three message categories defined in the banking example message
| set CHECK_ACC_MSGSET. The three categories have been created to hold
| messages specific to credits, debits, and enquiries.
|
|
CREDIT_CAT ENQ_CAT
MSG-5 MSG-6
DEBIT_CAT
CHECK_ACC_MSGSET
|
| Figure 14. Messages within categories
| A suspended category does not appear in extracted documentation. You can add
| messages to a suspended message category, and transactions to a suspended
| transaction category.
| You cannot create an object in the suspended state. If you want to suspend an
| object, you must check in the newly created object, and check it out again to
| make this update.
|
| Element qualifier
| An element qualifier defines additional information that makes the definition of an
| element more specific. You can use an element qualifier to add constraints to the
| model.
| When you have defined an element qualifier, you can add a constraint to it, for
| example, a minimum length. You can associate the element value with an element
| qualifier, and associate the element qualifier with the element, by updating the
| Element Qualification pane. This relationship is shown in Figure 15 on page 57.
|
references member of
ELEMQUAL
(element qualifier)
member of
MAXLEN
(element value)
references
INTEGER
(simple type)
|
| Figure 15. Element qualification
You can also use element values to add constraints to an element. This is described
in “Element value” on page 59.
| You cannot create an object in the suspended state. If you want to suspend an
| object, you must check in the newly created object, and check it out again to
| make this update.
| Element Name Enumerated Specify the name of the element with which this qualifier is associated. You can
| Type only select an element from the displayed list of elements that already exist
| within this message set.
|
The member relationship affects the path from the root of the message to the
element identified by the element qualifier. If you update the cardinality, for
example to make the element mandatory, you force all the elements down the path
to this element to be mandatory even if the Connection pane specifies optional.
The change to the element qualifier overrides the corresponding properties on the
| related objects, and might result in unexpected behavior.
| Transaction
| A transaction is an optional entity that you can use to group a set of messages that
| you consider to be a single business transaction. Do not confuse this with a
| transaction that is determined by XA coordination. Its use is simply to group
| messages that serve a related purpose.
| The banking example message set has been enhanced to include a transaction
| category CREDIT_CAT, that contains transaction CREDIT_TXN, as shown in
| Figure 16. The transaction contains two messages, a request message and a reply
| message, that together make up each credit and debit operation. The reply message
| acknowledges the success or failure of the operation.
|
|
REQ-MSG REPLY-MSG
CREDIT_TXN
CREDIT_CAT
|
| Figure 16. Messages within transactions
| You can add messages to a suspended transaction. You cannot add a suspended
| transaction to a transaction category.
| You cannot create an object in the suspended state. If you want to suspend an
| object, you must check in the newly created object, and check it out again to make
| this update.
|
| Element value
| You can use an element value to build constraints into your message model.
| In the example in Figure 17 on page 60, the element ELEMENT1 is defined based
| on simple type STRING. If you want to limit the size of this string to 10 characters,
| you can define an element value, MAXLEN, instantiate it as a simple type of
| INTEGER, and set its value to 10. You can then associate the element value with
| the element ELEMENT1 by adding a value constraint with a role of Max Length to
| the element and selecting the element value MAXLEN.
|
member of
MAXLEN
(element value)
references
INTEGER
(simple type)
|
| Figure 17. Example of an element value
| You cannot create an object in the suspended state. If you want to suspend an
| object, you must check in the newly created object, and check it out again to
| make this update.
| Type Enumerated Specify the type of the element value. Select one of the simple types, except
| Type BINARY which cannot be specified. You cannot change this property after you
| have created the element value and checked it in.
| There is no need for an element value of type BINARY due to the absence of an
| enumeration role for BINARY value constraints. The data held in a BINARY
| element is treated as a group of bits and is not validated against enumerated
| values. If you create an element value under an element or element qualifier in
| the message set tree (rather than as an individual object in the Element Values
| folder), you must create it in a particular role. In this case its Type is set
| automatically in the context of that role, and you cannot change it.
| For some element data types, take these restrictions into account when you set
| Value:
| v If the element with which you associate this element value is BOOLEAN, enter
| one of the following values for the Value property: 0, 1, true, or false.
| v If the element with which you associate this element value is DATETIME, enter
| an ISO compatible string for the Value property. For details of valid strings, see
| Appendix C, “DATETIME formats” on page 253.
| v If the element with which you associate this element value is STRING, enter
| only alphanumeric characters for the Value property.
|
| Notes:
| 1. The type of the element value object must be BOOLEAN.
| 2. The type of the element value object must be INTEGER.
| 3. The type of the element value object must be the same as that of the element.
| 4. The type of the element value object must be STRING.
|
|
| Relationships between MRM objects
| You can associate MRM objects with one another in two ways (shown in Figure 18
| on page 63):
| v By Reference. For example, an element references its underlying type (which
| might be INTEGER, STRING, and so on).
| v Member of. For example, a compound type might be formed from three elements.
| These elements are members of the compound type. You can view and modify
| additional properties associated with the member of relationship. For example,
| does the element repeat within this compound type, and is it mandatory or
| optional?
Message
Set
Reference
Message Transaction Member
Category Category Transaction
Member Member
Message
Reference Member
Member
Reference Compound
Type
Member
Member
Member Member
| CWF is used to model fixed format messages and thus the message and all the
| elements in the message must be predefined. The CWF cannot handle elements
| that are not defined in the model, because C headers and COBOL copybooks
| cannot be dynamically changed.
| The TDS layer supports both predefined and self-defining messages, and can be
| used to model both types of message, or a message that is a combination of the
| two. The XML layer provides support for self-defining messages and self-defining
| elements. Both layers can handle elements that are not defined within the model.
| In addition, you can create partial definitions of messages, in which some elements
| have been defined to the MRM, but others are self-defining. This is very useful if
| you want to update just part of a very large message. You can choose to define to
| the MRM only the sections of message that are to be altered: the remaining
| elements are treated as self-defining. This technique is referred to as a sparse
| message model.
| The XML domain and the generic XML parser (described in Chapter 10, “The XML
| domain” on page 191) only support self-defining messages, which means that
| validation is limited because there is no dictionary in the parser against which to
| validate the message. If a message is interpreted as self-defining by the parser, you
| can define the message to the MRM through the Control Center (but you do not
| need to deploy the message set to the broker). This helps you with message flow
| design because it allows you to use drag and drop to generate ESQL in message
| flow nodes.
| Null handling
| There are two types of null representation in the MRM:
| 1. Explicit null. A null value is explicitly stated with a value. This value can be
| assigned and queried using ESQL. Explicit nulls can be used in all wire formats
| except PDF (where null is always assumed to be –1).
| 2. Implicit null. A null value is absent from a message and is therefore implied.
| This is valid for the XML wire format layer, but is not applicable for CWF and
| TDS, where there is no concept of implicit NULL.
| For more information about using null values in ESQL, see “Querying null values
| in an input message” on page 74 and “Setting null values in an output message”
| on page 74.
| Within the MRM you can set various elements to NULL. Table 21 on page 65
| shows which elements are allowed to take NULL values, depending on their MRM
| simple type.
| If a compound type has a base type (defined in “Type” on page 49), it implicitly
| has a value. If it does not, it has no value. When a base type is present without a
| value, a null event is output. For an example of how these are handled, see “Null
| handling” on page 74 in “Using ESQL to manipulate the message tree” on page 69.
| Data conversion
| If you are processing messages that originate from applications running on
| different systems, or in different locales, or both, you must consider if message
| data needs to be converted. For further discussion of data conversion
| considerations, refer to the section “Planning for data conversion” in the WebSphere
| MQ Integrator Introduction and Planning book.
| If you use WebSphere MQ Integrator facilities to provide data conversion, these are
| governed by the choice of wire format layer. For further details, see:
| v “Data conversion with CWF” on page 106
| v “Data conversion with XML” on page 122
| v “Data conversion with TDS” on page 146
| If your messages use the MQSeries transport protocol, you can also use MQSeries
| facilities. See the MQSeries Application Programming Reference book.
| The tree it creates is a structure that is devoid of any information associated with
| the physical characteristics of the message. It is made up of items (called elements)
| that represent the components in your message model.
| You can clearly see the tree format that is created if you trace a message (from the
| root of the message tree) using a Trace node in a message flow.
Element Fred
(based on simple type STRING)
Element George
(based on compound type
with a base type of STRING)
Element Nick
(based on simple type STRING)
Element Ian
(based on simple type STRING)
Element Jo
(based on compound type)
Element Kate
(based on simple type STRING)
|
| Figure 19. An example message
|
| You could represent this message in XML with the following content:
| <Fred>hello<Fred>
| <George>world
| <Nick>nice</Nick>
| <Ian>hot</Ian>day
| <Jo>
| <Kate>today</Kate>
| </Jo>
| </George>
| The message, MSG 1, contains elements (instantiated simple and compound types),
| embedded simple types, and embedded compound types. One of the compound
| types (George) has a base type associated with it. The message tree that is created
| from this message is shown in Figure 20 on page 68.
|
George
Fred (with associated value)
STRING
Nick Ian Jo
(ambiguous)
Kate
|
| Figure 20. Example message tree
|
| The first tree element is MRM. This corresponds to the tree element Body in the
| message tree structure shown in Figure 1 on page 13. If the message is parsed by
| the MRM parser, the first element is always MRM. The parser creates a named
| element in the tree that corresponds to each MRM element that you have defined
| in your message model (whether it is an instantiated simple or compound type).
| The parser allocates a name to each element in the tree that equates to the
| identifier of the equivalent element in the message model.
| Embedded simple types do not have a name because they are not instantiated as
| an element, therefore the tree contains an ambiguous element. The embedded
| simple type appears as an element in the tree, and has a value, but it has no
| associated name.
| The element George, which is based on a compound type that has an associated
| base type, has a value (data) associated with it. However, the element Jo, which is
| also based on a compound type, has no value (data) associated with it because the
| compound type has no base type defined.
| If you want to update element Kate with the value yesterday you must:
| SET OutputRoot.MRM.George.Jo.Kate=’yesterday’;
| You can see from these examples that the name that you defined for the message
| model does not appear in the ESQL. You must address each element in the ESQL
| using the model element identifier, not the name.
| For further general information about using ESQL to access elements, see
| “Referencing elements” on page 71.
| This statement sets the third child of the element George to night. Because this
| statement is addressing an ambiguous element in the tree (an embedded simple
| type that has no name), you can only set its value if you know its specific position
| in the tree.
| For further general information about using ESQL to access simple types, see
| “Referencing simple types” on page 72.
| The base type becomes the value (data) associated with the element’s underlying
| compound type.
| For further general information about using ESQL to access base types, see
| “Referencing base types” on page 72.
| For further general information about using ESQL to access compound types, see
| “Referencing compound types” on page 73.
| If you want your message flow to process MRM messages, you must ensure that
| the following properties are set. If the message is an MQSeries message, these can
| be set either in the input node or in the MQRFH2 header of the incoming message
| (if they are set in both, the contents of the MQRFH2 header take precedence). If the
| message is not an MQSeries message, these properties must be set in the input
| node of the message flow:
| v Message Domain
| v Message Set
| v Message Type
| v Message Format
| For further information about the MQRFH2 header, see the WebSphere MQ
| Integrator Programming Guide. For further information about input node properties,
| see the Control Center online help.
| When the output message is generated, you can set these properties using ESQL.
| The output properties do not have to be the same as the input properties:
| Table 24. Output MRM message properties
| Property Value
| Message Domain MRM
| Message Set Message set identifier
| Message Type Message identifier (see note)
| Message Format PDF or wire format identifier
| Note: If you are using multipart messages, refer to Table 3 on page 44 for details of how
| MessageType is used.
|
| For example, to set the output message properties for an output MRM message,
| use the following ESQL:
| SET OutputRoot.Properties.MessageDomain = ’MRM’;
| SET OutputRoot.Properties.MessageSet = ’DH06JOE06S001’;
| SET OutputRoot.Properties.MessageType = ’m_mess101’;
| SET OutputRoot.Properties.MessageFormat = ’XML’;
| or
| SET OutputRoot.Properties.MessageFormat = ’CWF’;
| or
| SET OutputRoot.Properties.MessageFormat = ’TDS’;
| You must set the message domain to MRM even if the output message format is
| XML.
| If you select the property Use as Message Body by checking the check box in the
| Compute node properties dialog, this sets the Message Set and Message Type
| properties for the output message (propagated from this node) to be the same as
| those for the message received by this node.
| In ESQL, element identifiers are usually used to reference and update MRM
| elements. The exception is when simple types are present in the message. If you
| are using multipart messages, the simple type references must be further qualified
| by the message identifier if the message is not the first message object in the bit
| stream.
| Referencing elements
| If you want to copy an element from input to output without changing it, use the
| following ESQL:
| SET OutputRoot.MRM.Name.FirstName = InputBody.Name.FirstName;
| If you want to copy an element from input to output, and update it, for example
| by folding to uppercase or by calculating a new value:
| SET OutputRoot.MRM.Name.FirstName = UPPER(InputBody.Name.FirstName);
| SET OutputRoot.MRM.Borrowed.Cost = InputBody.Borrowed.Cost * 1.5;
| If you have set the Type Composition property of the compound type that contains
| the element to Sequence, you can add the same element to the compound type
| more than once (a duplicate). These instances do not have to be contiguous, but
| you must use the same method to refer to them.
| For example, if you create a compound type with Type Composition of Sequence that
| contains the following elements:
| StringElement1
| IntegerElement1
| StringElement1
| and the following assignment to set the value of the second occurrence:
| SET OutputRoot.MRM.StringElement1[2] = ’BILL’;
| If you want to set the value of Elem1 to xyz, use the following ESQL:
| SET OutputRoot.MRM.Elem1.*[1] = ’xyz’;
| A simple type does not have facilities for null handling that many elements have.
| If you set a simple type to null, it is deleted from the message.
| The sample Video message, described in “Example: modeling the Video customer
| message” on page 78, has an element Name that has child elements Title and
| FirstName. It also has a base type of STRING. You can use this to model an
| incoming XML message like this:
| <Customer><Name>Edwards<Title>Mr</Title><FirstName>Peter</FirstName></Customer>
| The ESQL that you need to write to manipulate the inner message varies
| depending on which of the above models you have used. For example, assume
| you have defined:
| v An outer message with Identifier set to M_outer.
| v An inner message with Identifier set to M_inner1. This inner message is defined
| as an element with Identifier set to E_outer1 and Type set to a compound type
| that has its Type Composition property set to Message. The first child element of
| the message M_inner1 has Identifier set to E_inner11.
| v A second inner message with Identifier set to M_inner2. This second inner
| message is defined as a compound type. The first child element of message
| M_inner2 has Identifier set to E_inner21.
| If you copy message headers from the input message to the output message, and
| your input message type contains a path, only the outermost identifier in the path
| is copied to the output message type.
| Compound types with Type Composition set to Choice: If you define messages
| within message sets that include XML and TDS wire formats, it is usually clear
| from the message data which option of a choice has been taken because the tags in
| the message represent one of the choice’s options. However, if your messages have
| CWF wire format, or are untagged TDS messages, it is not clear from the message
| data, and the application programs processing the message must determine which
| Null handling
| Nulls are handled differently in input and output messages.
| Querying null values in an input message: If you want to check the value of an
| element, you would code ESQL like the following:
| IF InputBody.Elem2.Child1 = ’xyz’ .....
| Assuming that nulls are permitted for this element (defined in Table 21 on
| page 65), this statement tests if the element exists in the input message, or if it
| exists and contains the MRM-supplied null value. The behavior of this test
| depends on the wire format:
| v For an XML element, if the XML tag or attribute is not in the bit stream, this test
| returns TRUE.
| v For an XML element, if the XML tag or attribute is in the bit stream and contains
| the MRM null value, this test returns TRUE.
| v For an XML element, if the XML tag or attribute is in the bit stream and does
| not contain the MRM null value, this test returns FALSE.
| v For a delimited TDS element, if the element has no value between the previous
| delimiter and its delimiter, this test returns TRUE.
| v For a delimited TDS element, if the element has a value between the previous
| delimiter and its delimiter which is the same as the MRM-defined null value for
| this element, this test returns TRUE.
| v For a delimited TDS element, if the element has a value between the previous
| delimiter and its delimiter which is not the MRM-defined null value, this test
| returns FALSE.
| v For a CWF or fixed length TDS element, if the element’s value is the same as the
| MRM-defined null value for this element, this test returns TRUE.
| v For a CWF or fixed length TDS element, if the element’s value is not the same as
| the MRM-defined null value, this test returns FALSE.
| If you want to determine if the field is missing, rather than present but with null
| value, you can use the ESQL CARDINALITY function.
| The content of the output bit stream would depend on the wire format:
| v For an XML element, neither the XML tag or attribute nor its value would be
| included in the output bit stream.
| v For a Delimited TDS element, neither the tag (if appropriate) nor its value
| would be included in the output bit stream. The absence of the element
| would typically be conveyed by two adjacent delimiters.
| v For a CWF or Fixed Length TDS element, the content of the output bit
| stream depends on whether the element has an element value of type
| Default. If it does have this value, the default value is included in the bit
| stream. If it does not, an exception is raised.
| the element is not deleted from the message tree. Instead, a special value of
| NULL is assigned to the element. The content of the output bit stream depends
| on the settings of the wire format null handling properties.
| If you set a compound element to NULL, this deletes that element and all its
| children.
| Null handling for base types: You can work with null values for base types. For
| example, message m1 is defined as follows:
|
|
m1
element1
element2
|
| You can use the following ESQL:
| SET OutputRoot.MRM.m1.s1.element1 = 5;
| If the output message is rendered in XML, and you have set the message set
| property Encoding Num Null in the XML wire format layer to NullAttribute, and
| the element member property Member Render for s1 to XMLElementAttrVal, the
| following output message is constructed:
| <m1>
| <s1 null="true">
| <element1>5</element1>
| </s1>
| </m1>
| If this input message is processed by a Compute node that also modifies the input
| message, the null attribute also appears in the output message generated from this
| input message, because the omission of the value for the base type of s1 is
| equivalent to the presence of a null value.
You can create message sets based on existing (finalized) message sets, both to
provide new versions of a single message set (with all versions retaining the same
name), and to use common characteristics and content from one message set in
another (where the new message set has a different name).
The possible states of the message set are discussed in the following sections. For
information about changing states, see “Changing the state of a message set” on
page 174.
Normal
If a message set is not locked (checked out), frozen, or finalized, it is considered to
be in normal working state. It can be checked out, updated, and checked in. This
state is not explicitly displayed in the Control Center: it is inferred by the message
not being locked, frozen, or finalized.
When you create a new message set, it is automatically checked in, then checked
out, and you see the key icon appear against the new message set. A message set
is never shown in new state (with the new icon against it). This is because its
identifier must be unique, and its uniqueness is guaranteed by its being recorded
in (and therefore checked in to) the message repository. Components of the
message set (for example, an element) do appear as new when they are first
created.
Locked
The state of a message set while it is checked out (locked) by a Control Center
user. A message set must be locked to your user ID before you can change any of
its properties. A message set must also be locked to you before you can freeze it.
Frozen
This is the state of a message set that is not expected to change (for example, on
entry to a test phase). It is indicated by the existence of a Freeze date in the
You cannot freeze a message set if any component of the message set is checked
out, or if a component definition it contains is incomplete.
A message set must move to the frozen state from the locked state, and both state
changes must be requested by the same user.
| If you import a message set from another message repository using the
| mqsiimpexpmsgset command, its state after import is Frozen.
Finalized
A message set and its components in this state cannot be changed or checked out.
Finalized state is indicated by the message property Finalized being set to true.
You are not allowed to finalize a message set if any component of the message set
is checked out or if a component definition it contains is incomplete.
A message set can move to the finalized state from any other state. However, if it
moves from the locked state to the finalized state, both state changes must be
requested by the same user.
When you have finalized a message set, no further changes can be made to its
contents. However, you can create a new message set based on the finalized
message set, within which you can define new messages. You can also make
limited changes to the existing messages in the new message set. For more
information, see “Message set versions”.
When a message set is based on another message set, it contains a copy of the
complete contents of the base message set. Within the new message set, new
messages can be defined, and limited modifications can be performed on existing
messages.
A message set can have the same name as another message set in the same
message repository if:
v The new message set is based on the message set of the same name.
v The message set on which it is based has a higher level number than any other
message set with the same name in the same repository.
v The level number of the new message set is higher than that of the message set
on which it is based.
| This is a simple message model that shows you how you can build up a logical
| message model and its associated wire format layers. An example of what a
| message that conforms to the model looks like is given for each of the three wire
| formats, in the following chapters.
| The example message is defined for a chain of video rental stores. The message
| model contains data pertinent to a customer who is borrowing videos. Data
| contained in messages includes:
| v Customer name.
| v Customer address.
| v The type of identifier that is used as proof of identity when a customer opens an
| account with the video store.
| v The videos that are currently on loan to the customer, the name of the video,
| when it is due back, and the rental fee. A maximum of three videos can be on
| loan at any one time.
| v Whether the customer has a copy of this month’s magazine.
| To model this message in the MRM, you must first define a message set,
| “VideoStore”. Table 25 lists the message set properties and their values.
| Table 25. Video customer message model example: message set properties
| Property Value
| Name VideoStore
| Level 1
| Finalized false
| Freeze Time Stamp (not set)
| Default Wire Format (not set)
| Default Null Permitted No
| Message Type Prefix (not set)
| Identifier (set automatically when you create the message set)
|
| You can now define the message “Customer”, and the top level compound type on
| which it is based. In the example, this is called “CustomerType”. You must define
| You must define each of the elements shown in the tree in Figure 21 on page 78
| with the appropriate simple type. The elements based on simple types are:
| v Title of type STRING
| v FirstName of type STRING
| v HouseNo of type INTEGER
| v Street of type STRING
| v Town of type STRING
| v PassportNo of type STRING
| v DrivingLicenseNo of type STRING
| v CreditCardNo of type STRING
| v VideoTitle of type STRING
| v DueDate of type DATETIME
| v Cost of type DECIMAL
| Some of these elements belong to the top level compound type that defines the
| message structure (CustomerType). Others belong to other substructure. You must
| define each of the four substructures as a compound type:
| v Name. This includes elements Title and FirstName. Its identifier is set to
| NameType, and it is defined with Type Composition set to Ordered Set, and Type
| Content to Open. This means that duplicate elements are not allowed, but other
| elements, not defined in this type, are allowed. That is, self-defining elements
| can be included in the message at this point. NameType is also defined to
| include a base type, which means that a value can be associated with the
| compound type itself. This value is defined as type STRING, and is used to
| contain the customer’s last name.
| v Address. This includes elements HouseNo, Street, and Town. Its identifier is set
| to AddressType, and it is also defined with Type Composition set to Ordered Set,
| and Type Content to Open.
| v IdType, which includes the elements PassportNo, DrivingLicenseNo and
| CreditCardNo as children. IdType represents a type with Type Composition set to
| Choice, and therefore Type Content is automatically set to Closed.
| v Borrowed, which includes the elements VideoType, DueDate, and Cost as
| children. It is defined with BorrowedType, which has Type Composition set to
| Sequence, and Type Content to Closed. Therefore duplicates are allowed, but no
| Table 27 lists the compound type properties and their values. Accept the default
| values for all properties not listed. If you define the elements before the compound
| types, you can add the elements when you create the compound types. If you
| create the compound types first, you can add the elements afterwards.
| Table 27. Video customer message model example: type properties
| Type name Type Composition Type Content Identifier Type
| CustomerType Sequence Open CustomerType (not set)
| AddressType Ordered Set Open AddressType (not set)
| BorrowedType Sequence Closed BorrowedType (not set)
| IdType Choice Closed IdType (not set)
| NameType Ordered Set Open NameType STRING
|
| You can now add the child elements to the compound types to complete the final
| message structure. Table 28 lists the element properties and their values.
| Table 28. Video customer message model example: element properties
| Element name Identifier Type
| Address Address AddressType
| Borrowed Borrowed BorrowedType
| Name Name NameType
| Title Title STRING
| FirstName FirstName STRING
| HouseNo HouseNo INTEGER
| Street Street STRING
| Town Town STRING
| PassportNo PassportNo STRING
| CreditCardNo CreditCardNo STRING
| DrivingLicenseNo DrivingLicenseNo STRING
| VideoTitle VideoTitle STRING
| DueDate DueDate DATETIME
| Cost Cost DECIMAL
| When you add the elements or compound elements to the compound types in
| which they are required, you create a member relationship with the parent
| compound type, and additional properties associated with the element’s cardinality
| and whether it is mandatory or optional are associated with this relationship.
| These options are shown on the Connection pane when you select the element
| where it appears within the compound type within the left pane of the Message
| Sets view of the Control Center.
| When you first add the element or compound type to its parent compound type,
| the Connection pane options are set with default values. The defaults define that
| each element or embedded compound type occurs once and only once, and does
| not repeat (it is mandatory).
| You can accept these defaults for all the elements and compound types except for
| the Borrowed element, because a customer can have up to three videos on loan at
| any one time. Change the Connection pane properties as shown in Table 29, which
| also lists the element member properties and their values. Remember that the
| options that you specify on the Connection pane are not verified by the broker.
| Table 29. Video customer message model example: element member properties
| Child element or compound Parent compound type Repeat Min Occurs Max Occurs
| type
| HouseNo AddressType No 1 (not set)
| Street AddressType No 1 (not set)
| Town AddressType No 1 (not set)
| VideoTitle BorrowedType No 1 (not set)
| Due Date BorrowedType No 1 (not set)
| Cost BorrowedType No 1 (not set)
| PassportNo IdType No 1 (not set)
| DrivingLicenseNo IdType No 1 (not set)
| CreditCardNo IdType No 1 (not set)
| Title NameType No 1 (not set)
| FirstName NameType No 1 (not set)
| Name CustomerType No 1 (not set)
| Address CustomerType No 1 (not set)
| IdType CustomerType No 1 (not set)
| Borrowed CustomerType Yes 0 3
| Magazine CustomerType No 1 (not set)
|
| When a message that conforms to this model is received by a message flow in the
| broker, it is parsed by the MRM parser (as described in Chapter 2, “Parsers” on
| page 7) and a tree structure is created, shown in Figure 22. The tree structure is
| independent of the physical characteristics of the message.
|
|
MRM
Borrowed[0..3]
| If you add more than one CWF layer to a single message set, you must
| specify a different CWF identifier for each one.
| The wire format identifier is not the same as the name of the wire format
| layer (although you could define it to have the same value). When you
| create a wire format layer, you must enter a name, and this value is used
| for display purposes only in the Control Center to identify the pane on
| which the wire format layer properties are displayed. In all references
| outside the Control Center (for example, in the MQRFH2 header of a
| message) the wire format identifier must be used, not the name.
| Default CCSID* INTEGER
| Enter a numerical value for the default Coded Character Set Identifier. The
| default is 500.
| Your choice must match the encoding with which messages are created. Big
| Endian is normally the correct option for messages created on UNIX or
| z/OS, Little Endian for Windows NT.
| Packed Decimal Byte Enumerated Select Big Endian (the default) or Little Endian from the drop-down list to
| Order* Type specify the byte order of numbers that are represented as packed decimal.
| In COBOL, this is equivalent to PIC 9 COMP-3 data type. (There is no
| equivalent data type in C.)
| Your choice must match the encoding with which messages are created. Big
| Endian is normally the correct option for messages created on UNIX or
| z/OS, Little Endian for Windows NT.
| Float Format* Enumerated Select one of S390 (the default), IEEE, or Reverse IEEE from the drop-down
| Type list to specify the byte order of numbers in the message that are
| represented as floating point.
| The start of a year usually falls in the middle of a week. If the number of
| days in that week is less than the value defined here, the week is
| considered to be the last week of the previous year; hence week 1 starts
| some days into the new year. Otherwise it is considered to be the first
| week of the new year; hence week 1 starts some days before the new year.
| Enter the minimum length of the first week of the year in days. The value
| must be between 1 and 7 inclusive. The default is 4.
| BINARY
| The properties for an element member of simple type BINARY are defined in
| Table 31.
| Table 31. CWF BINARY element member properties
| Property Type Meaning
| Physical Type Fixed value The value defaults to Binary. You cannot edit it.
| Length Type Enumerated Type Select one of the following from the drop-down list:
| v Count (described below)
| v Value Of (described below)
| Length Count INTEGER If you have set Length Type to Count, enter the number of bytes to specify
| the value of the element length. The minimum value is 0, the maximum
| value is 2147483647. The default is none (not set).
| Length Value Of Enumerated Type If you have set Length Type to Value Of, select the name of the INTEGER
| element that specifies the length of this element, in bytes, from the
| drop-down list of INTEGER elements that are defined as siblings of the
| current element, and occur before it in the structure of the message.
| Press the Delete key to reset the property to its default empty value.
| Length Units Enumerated Type Select one of the following from the drop-down list:
| v Bytes. This is the default value.
| v End of Bitstream. This is only valid if the element is the last in the
| message. If you select this value, you do not need to enter a value for
| Length Count or Length Value Of.
| For example, if you define two elements of two bytes each and the second
| has a Skip Count of five, the five bytes that occur between the first and
| second elements are ignored. When an output message is written, Skip
| Count bytes are assigned the value x’00’.
| Byte Alignment Enumerated Type Specify how the element is aligned from the start of the message. Select one
| of:
| v 1 Byte. This is the default value.
| v 2 Bytes
| v 4 Bytes
| v 8 Bytes
| v 16 Bytes
| Repeat Count Type Enumerated Type This is only displayed if you have set the Repeat property on the
| Connection pane to Yes.
| NULL values are not defined for BINARY types. The properties Encoding Null and
| Encoding Null Value, present for other types, are therefore not set.
| When a message is written, Skip Count bytes have the value x’00’.
| Byte Alignment Enumerated Type Specify how the element is aligned from the start of the message. Select one
| of:
| v 1 Byte. This is the default value.
| v 2 Bytes
| v 4 Bytes
| v 8 Bytes
| v 16 Bytes
| Repeat Count Type Enumerated Type This is only displayed if you have set the Repeat property on the
| Connection pane to Yes.
| BOOLEAN fields with null values are rendered using the message set property
| Boolean Null Value. The properties Encoding Null and Encoding Null Value, present
| for other types, are therefore not set here.
| The minimum value that you can specify is 1 for all three physical types.
| The maximum value that you can specify is 256 for Fixed Length String,
| 10 for Packed Decimal, and 2147483647 for Binary.
| Press the Delete key to reset the property to its default empty value.
| If you have selected another value for Physical Type, select one of the
| following from the drop-down list:
| v Bytes. This is the default value.
| v End of Bitstream.
| Signed BOOLEAN If you have set the Physical Type property to Packed Decimal, Time Seconds,
| or Time Milliseconds, select either Yes (the default) or No from the
| drop-down list. If you have selected another value for Physical Type, this
| property is invalid.
| Sign Orientation This property is reserved for future use.
| Byte Alignment Enumerated Type Specify how the element is aligned from the start of the message. Select one
| of:
| v 1 Byte. This is the default value.
| v 2 Bytes
| v 4 Bytes
| v 8 Bytes
| v 16 Bytes
| String Justification Enumerated Type If you have set the Physical Type property to Fixed Length String, select
| Left Justify (the default value) or Right Justify from the drop-down list.
| If you have selected another value for Physical Type, this is set to Not
| Applicable.
| If you set the Physical Type to Binary, the template is restricted to those
| components defined in Table 110 on page 256. If you set the Physical Type to
| Packed Decimal, TimeSeconds, or TimeMilliseconds, the template is
| restricted to those components that represent numbers. In these cases, you
| must update this Format String property.
| When a message is written, Skip Count bytes have the value x’00’.
| Repeat Count Type Enumerated Type This is only displayed if you have set the Repeat property on the
| Connection pane to Yes.
| If you set the Encoding Null property to NULLLogicalValue, you must set
| this property to an ISO8601 datetime format. These formats are described in
| note 6 on page 255 in “DATETIME as STRING data” on page 253. For
| example, specify a value conforming to yyyy-MM-dd’T’HH:mm:ss such as
| 1970-12-01.
| If you set the Encoding Null property to NULLLiteralValue, you must set
| this property to a value that conforms to the pattern that you have set in
| the propertyFormat String. If you have set Physical Type to Fixed Length
| String, the value that you specify for this property must be of the same
| length as the field.
|
| When a message is written, skip count bytes have the value x’00’.
| Repeat Count Type Enumerated Type This is only displayed if you have set the Repeat property on the
| Connection pane to Yes.
| When a message is written, Skip Count bytes have the value x’00’.
| Byte Alignment Enumerated Type Specify how the element is aligned from the start of the message. Select one
| of:
| v 1 Byte. This is the default value.
| v 2 Bytes
| v 4 Bytes
| v 8 Bytes
| v 16 Bytes
| String Justification Enumerated Type If you have set the Physical Type property to Extended Decimal, select Left
| Justify or Right Justify (the default value) from the drop-down list. If
| you have selected another value for Physical Type, this is set to Not
| Applicable.
| Padding Character STRING The padding character is used to fill out the remaining character positions
| when the string length is less than the specified string size. If you have set
| Physical Type to Extended Decimal and String Justification to either Left
| Justify or Right Justify, select this character in one of the following
| ways:
| v Select either SPACE or NUL (not NULL) from the drop-down list.
| v Enter a character between quotes, for example "c" or ’c’, where c is any
| alphanumeric character.
| v Enter a hexadecimal character code in the form 0xYY where YY is a
| hexadecimal value.
| v Enter a Unicode value in the form U+xxxxxx where xxxxxx is a Unicode
| value specified in hexadecimal. The maximum length of the string you
| can enter is 10.
| v Select the default value of an empty string.
| When a message is written, skip count bytes have the value x’00’.
| Byte Alignment Enumerated Type Specify how the element is aligned from the start of the message. Select one
| of:
| v 1 Byte. This is the default value.
| v 2 Bytes
| v 4 Bytes
| v 8 Bytes
| v 16 Bytes
| String Justification Enumerated Type If you have set the Physical Type property to Extended Decimal, select Left
| Justify or Right Justify (the default value) from the drop-down list. If
| you have selected another value for Physical Type, this is set to Not
| Applicable.
| Padding Character STRING The padding character is used to fill out the remaining character positions
| when the string length is less than the specified string size. If you have set
| Physical Type to Extended Decimal and String Justification to either Left
| Justify or Right Justify, you can select this character in one of the
| following ways:
| v Select either SPACE or NUL (not NULL) from the drop-down list.
| v Enter a character between quotes, for example "c" or ’c’, where c is any
| alphanumeric character.
| v Enter a hexadecimal character code in the form 0xYY where YY is a
| hexadecimal value.
| v Enter a Unicode value in the form U+xxxxxx where xxxxxx is a Unicode
| value specified in hexadecimal. The maximum length of the string you
| can enter is 10.
| v Select the default value of an empty string.
| Repeat Count Type Enumerated Type This is only displayed if you have set the Repeat property on the
| Connection pane to Yes.
| The minimum value that you can specify is 0 (zero), the maximum value
| that you can specify is 2147483647
| Press the Delete key to reset the property to its default empty value.
| When a message is written, Skip Count bytes have the value x’00’.
| Byte Alignment Enumerated Type Specify how the element is aligned from the start of the message. Select one
| of:
| v 1 Byte. This is the default value.
| v 2 Bytes
| v 4 Bytes
| v 8 Bytes
| v 16 Bytes
| String Justification Enumerated Type If you have set the Physical Type property to Fixed Length String, select
| Left Justify (the default value) or Right Justify from the drop-down list.
| If you have selected another value for Physical Type, this is set to Not
| Applicable.
| When a message is written, skip count bytes have the value x’00’.
| Byte Alignment Enumerated Type Specify how the element is aligned from the start of the message. Select one
| of:
| v 1 Byte. This is the default value.
| v 2 Bytes
| v 4 Bytes
| v 8 Bytes
| v 16 Bytes
| Repeat Count Type Enumerated Type This is only displayed if you have set the Repeat property on the
| Connection pane to Yes.
| Null values are not defined for compound elements: the properties Encoding Null
| and Encoding Null Value, present for other types, are therefore not set.
| You must set the property Type Composition for the compound type on which the
| outermost message is based to Message. You can define this compound type to
| contain one or more messages, but only one of these can appear in the bit stream.
| In CWF, there is no way to identify within the bit stream of the message body
| which embedded message appears, so you must define this choice in one of two
| ways:
| v You can set the Message Type property (either in the input message’s MQRFH2
| header, or in the input node properties) to be a path, which contains the
| hierarchy of messages or elements or both from the outermost message to the
| innermost message. For further information, see the description and use of the
| message set property Message Type Prefix in Table 2 on page 43 and Table 3 on
| page 44.
| v You can code ESQL to reference the messages contained in the compound type.
| The first message that you reference in this way is assumed to be the selected
| message.
| CWF can only use the Message Type property to resolve the hierarchy of the first
| embedded message structure. If you have defined the outer message to contain
| more than one compound type that defines embedded messages, you must resolve
| the message choice within the second and subsequent compound types using
| ESQL.
|
| Data conversion with CWF
| You can convert an MRM message to a different code page or encoding, or both.
| To do this, you should set the CodedCharSetId and Encoding fields in the
| appropriate output MQSeries header to the target value. The appropriate MQSeries
| header is the header that precedes and is adjacent to the output message body.
| The Data Conversion performed is dependent on the simple type of each element:
| v BINARY elements are not converted.
| v BOOLEAN elements are not converted.
| v DATETIME elements are handled as either BINARY, STRING, or packed
| decimals. If a DATETIME element is defined as BINARY, it is not converted. If it
| is defined as STRING, it is converted as a STRING element (described below). If
| it is defined as a packed decimal value, it is converted as a DECIMAL with
| Physical Type set to Packed Decimal (described below).
| There are also rules that affect the following properties that define the relationship
| between the logical model and CWF:
| v “Type property Type Composition”
| v “Type property Type Content” on page 108
| v “Type property Type” on page 108
| v “Element value property Default Value” on page 109
| Refer to “Using ESQL to manipulate the message tree” on page 69 for details of
| how to manipulate the base type with ESQL.
| You must modify the message set properties shown in Table 39.
| Table 39. Video customer example with CWF: message set properties
| Property Value
| Boolean True Value 31
| Boolean False Value 30
| Boolean Null Value 00
|
| The only other CWF properties that you need to set are for the element members
| within compound types. These are shown in Table 40.
| Table 40. Video customer example with CWF: element member properties
| Compound Type Element Property Value
| CustomerType Name Length Count 20
| NameType Title Length Count 3
| NameType FirstName Length Count 30
| AddressType HouseNo Physical Type Extended Decimal
| AddressType HouseNo Length Count 5
| AddressType Street Length Count 20
| AddressType Town Length Count 20
| IdType PassportNo Length Count 20
| IdType DrivingLicenseNo Length Count 20
| IdType CreditCardNo Length Count 20
| CustomerType Borrowed Repeat Count 2
| BorrowedType VideoTitle Length Count 20
| BorrowedType DueDate Length Count 11
| BorrowedType DueDate Format String dd-MMM-yyyy
| BorrowedType Cost Physical Type Extended Decimal
| BorrowedType Cost Length Count 4
| You must check in a message set before you can add a physical wire format layer.
| You must check in the resources of the message set and check out each in turn
| before you can view the wire format layer pane against each of the MRM objects.
| The XML wire format layer pane is described for each of the MRM objects. This
| pane is in addition to the panes discussed in Chapter 4, “The MRM logical
| message model” on page 35.
| In the part of the message that has been defined to the MRM, some elements
| might not have been defined. Because the compound type property Type Content is
| not validated by the broker, the broker assumes a setting of Open for XML
| messages. This means that self-defining elements are always allowed. If the MRM
| parser encounters a self-defining element in an incoming message, it outputs the
| element in the same position in the outgoing message.
| If an input message contains elements that are interpreted as self-defining, but the
| output message requires fully predefined elements (for example, it has CWF wire
| format), the parser might fail or produce unexpected results.
| The wire format identifier is not the same as the name of the
| wire format layer (although you can define it to have the same
| value). When you create a wire format layer, you must enter a
| name, which is used for display purposes only in the Control
| Center to identify the tab on which the wire format layer
| properties are displayed. In all references outside the Control
| Center (for example, in the MQRFH2 header of a message) the
| wire format identifier must be used, not the name.
| Suppress XML Declaration Enumerated Type Select Yes or No from the drop-down list. If you select Yes, the
| declaration (for example, <?xml version=’1.0’
| encoding=’ccsid’>) is suppressed and the encoding is taken
| from the MQMD.
| Standalone Document Enumerated Type Select Yes or No from the drop-down list. If you select Yes, the
| broker does not attempt to load an external subset. It is
| effectively ignored other than to be included in the declaration.
| Suppress DOCTYPE Enumerated Type Select Yes or No from the drop-down list. If you select Yes, the
| DOCTYPE (DTD) declaration is suppressed.
| DOCTYPE System ID STRING Specify the System ID for DOCTYPE external DTD subset (if
| DOCTYPE is present). This is normally set to the name of the
| generated (or imported) DTD for a message set.
| This can be used to provide name mapping when the MRM identifier needs
| to be different from the XML name, for example because of different
| namespace rules. It must be a valid XML name.
| If you do not set a value, it defaults to that of the element’s identifier. If the
| element’s identifier is a prefixed identifier, it defaults to the identifier with
| the caret character (^) replaced by an underscore (_).
| The value that you specify takes precedence over the XML Name that you
| specified for the element, and can be used to provide name mapping
| when the MRM identifier needs to be different from the XML name, for
| example, because of different namespace rules. This must be a valid XML
| Name.
| Table 45 shows examples of the values that you can set for the Member Render
| property.
| Table 45. The effect of rendering options on XML output
| XML Member Render Result
| option
|| <X> XMLElement Member XML Name = A
| <A>value of element</A>
| </X>
|
|| <X A=’value of element’/> XMLAttribute Member XML Name = A
| See also Table 45 on page 118 for the effects that your choices have on output
| messages.
| Table 46. XML rendering options for element members
| Example XML Member Render Member Id Member Id Member Value
| property value Attribute Name Attribute Value Attribute Name
|| <parent> XMLElement (default) not applicable not applicable not applicable
| <child>Cvalue</child>
| </parent>
| <parent child=’Cvalue’/> XMLAttribute not applicable not applicable not applicable
|| <parent> XML ElementAttrId Fred XXXX not applicable
| <child Fred=’XXXX’>
| Cvalue
| </child>
| </parent>
|| <parent> XMLElementAttrVal not applicable not applicable George
| <child George=’Cvalue’/>
| </parent>
|| <parent> XMLElementAttrIdVal Fred XXXX George
| <child George=’Cvalue’
| Fred=’XXXX’/>
| </parent>
|
|
| Null handling in the XML wire format
| The XML wire format layer supports handling of null values within messages. The
| rules for whether nulls are permitted are described in “Null handling” on page 64.
| NULL properties for XML are set for a message set only and apply to all the
| defined objects within the message set.
| You can use the following two NULL encoding properties to represent the numeric
| and non-numeric encoding for NULL within the XML layer:
| v Encoding Null Num
| v Encoding Null Non-Num
| These represent the numeric and non-numeric encoding for NULL within the XML
| layer:
| v The numeric data types are:
| – DECIMAL
| – FLOAT
| – INTEGER
| v The non-numeric data types are:
| – BINARY
| – BOOLEAN
| – DATETIME
| – STRING
| Notes:
| 1. The value of Boolean True is used.
| 2. This is only valid for XMLElementAttrVal and XMLElementAttrIdVal element rendering,
| as specified in Table 45 on page 118. Marking an element as being rendered in this way
| is equivalent to removing the attribute of the element that detailed the element’s value.
|
| You do not have to supply additional clarification for NULLEmpty and NULLValAttr,
| but if you select NULLValue, NULLAttribute, or NULLElement, you must define
| further values to be assigned to represent the NULL condition in the Encoding Null
| Num Value and Encoding Null Non-Num Value message set properties (see Table 47).
| If you select NULLValue, NULLAttribute, or NULLElement, the value that you enter for
| the Encoding Null Num and Encoding Null Non-Num properties are converted to
| their logical value. When an output message is constructed, the logical value is
| written in the same way as any other value. When the input message is parsed, the
| converted logical value is compared against the converted message data.
| NULL value
| Unlike the TDS and CWF layer, when you set the Encoding Null Num property to
| NULLValue, the value is taken as a literal. A direct comparison is done with the text
| string, and no logical data conversion is performed.
| For example, if you set the message set property Encoding Null Num to the value
| NULLValue, and you set Encoding Null Num Val to 0, a FLOAT value of 0.0 or a
| DECIMAL value of +0 does not match NULL.
| If you set Encoding Null Num to NULLEmpty, this is equivalent to setting Encoding
| Null Num to NULLValue and Encoding Null Num Val to "".
| If you set the message set property Encoding Null Num to NULLElement, there is no
| way to represent a null value for an attribute value. If a null value is present in the
| tree (from ESQL or another format), an attribute with an empty string is written in
| the output message.
| Conversely, if you have set the message set property Encoding Null Num or
| Encoding Null Non-Num to NULLValAttr, there is no way to represent a null value
| for a value rendered as XML content. If a null value is present in the tree, when
| writing an empty string, an element with no character content is written out
| instead.
|
| Multipart messages in the XML wire format
| If you define a message to contain other messages, the embedded messages can be
| self-defining. If they are not, you must define them in the same message set as the
| outermost message, You must also define all embedded messages with the same
| wire format as the outermost message.
| You must set the property Type Composition for the compound type on which the
| outermost message is based to Message. You can define this compound type to
| contain one or more messages, but only one of these can appear in the bit stream.
| When you configure a message flow to process these messages, you can set the
| Message Type property in the input node properties. Alternatively, you can specify
| this in the input message’s MQRFH2 header. The value you set must be a path that
| contains the hierarchy of messages or elements, or both, from the outermost
| message to the innermost message. All messages or elements, or both, must exist in
| this path. For further information, see the description and use of the message set
| property Message Type Prefix in Table 2 on page 43 and Table 3 on page 44.
| You can define the outer message to contain more than one compound type that
| defines embedded messages, and you can define an embedded message to contain
| another embedded message. An embedded message, wherever it occurs, must start
| with the tag for that message. An embedded message within an embedded
| message must start with the tag for that message, and must complete with its end
| tag before the end tag of its embedding message. If an embedded message follows
| a previous embedded message, it must start with its tag after the end tag of the
| previous embedded message.
| You might not know in advance which message has been embedded. If you need
| to know, you can code ESQL in the message flow to query the FIELDNAME of the
| first child of the compound element. This returns the message identifier of the
| inner message.
| For example, you have defined a message that includes two embedded messages.
| When an input message is received, it must contain one of the two defined
| embedded messages, which have identifiers of membMsg1 and membMsg2. Your outer
| message includes an element embMsgId that is based on a compound type with Type
| Composition set to Message.
| The DTD importer ignores attribute datatypes such as ENTITY and ID. It sets the
| compound type property Type Composition to Choice, Sequence, or Simple
| Unordered Set to model the DTD. It models mixed content element declarations
| using a compound type with an associated base type.
| The DTD importer updates the Connection pane properties to show the cardinality,
| although this is not validated by the broker.
| If you have complex DTDs that require more flexible logical message model
| definitions, you are recommended to create these models yourself.
|
| Rules for XML wire format properties
| When you use the XML wire format, you must conform to a number of rules that
| apply to the setting of properties:
| v Cardinality for type members is not validated, for example if the type member is
| mandatory, and if it repeats.
| v The MRM does not support external entities, therefore the broker does not
| search for entities defined outside the current document. External entity
| references or DTDs located externally are not referenced.
| v The value of the Type Content property of a compound type is not checked. For
| XML messages, the broker assumes this is set to Open, therefore self-defining
| elements might be present in the message in addition to those defined to the
| MRM.
| General rules
| You must consider the following general rules when you model a DTD in the
| MRM:
| v For every <!ELEMENT....> in a DTD, you must define an associated element in
| the MRM model
| is equivalent to:
| <name>abcdef<A>xx</A><B>zz</B></name>
| You can also model sparse XML messages using this setting.
| - Closed. The compound type can only contain the child elements that you
| have added to it.
| - Open Defined. The compound type can contain any valid children defined
| within the message set. You might find this very useful when you are
| dealing with multipart messages, where this compound type has a
| previously defined message embedded within it.
| - Message. Used for multipart message support, described in “Multipart
| messages in the XML wire format” on page 121.
| Table 48. Combinations of Type Composition and Type Content for XML message modeling
| Type Composition Type Content Valid children Application
| Empty Closed None Models <!ELEMENT name EMPTY> with no
| attributes
| Empty Open None Models <!ELEMENT name ANY>, any
| elements are allowed
| Empty Open Defined None Models multipart messages
| Choice Closed Elements, simple types, Models choice in DTD element
| and compound types declaration.
| You can model mixed content element content if you set Type Composition to
| Sequence and Type Content to Choice, and including a simple type of STRING (that
| is, an ambiguous element) as a child of the compound type. The simple type of
| STRING models the #PCDATA. Alternatively, you can model the string as a base type
| of type STRING. This is preferable because you can access the base type by name
| in the message flow ESQL, and the base type is not ambiguous.
| Table 50 on page 126 shows the different types of behavior for the attributes in a
| DTD attribute list declaration (modeled as a Simple Unordered Set).
| Table 54 shows the type member properties. The additional two properties
| displayed for each type member, Member ID Attribute Name, Member ID Attribute
| Value, and Member Value Attribute Name, are all not applicable for this example.
| Table 54. Video customer example with XML: type member properties
| Child element name Member Render property Member XML Name property
| Title XMLElement Title
| FirstName XMLElement FirstName
| HouseNo XMLElement HouseNo
| Street XMLElement Street
| Town XMLElement Town
| VideoTitle XMLElement VideoTitle
| DueDate XMLElement DueDate
| Cost XMLElement Cost
| PassportNo XMLElement PassportNo
| DrivingLicenseNo XMLElement DrivingLicenseNo
| CreditCardNo XMLElement CreditCardNo
|
| Table 55 shows the updates you must make to the type member properties to
| achieve this.
| Table 55. Video customer example with XML: updated type member properties
| Child element name Member Render property Member XML Name property
| VideoTitle XMLAttribute Name
|
| You can mix the rendering within a type: for example, you can have one child
| rendered as an element and another as an attribute. The following are all valid
| representations of the Name field, where the Name is Bloggs, Title is Mr and First
| Name is Fred:
| <Name>Bloggs<Title>Mr</Title><FirstName>Fred</FirstName></Name>
|
| <Name="Bloggs"<Title="Mr"/><FirstName="Fred"/>/>
|
| <Name>Bloggs<Title id="Mr"/><FirstName="Fred"/></Name>
| You can add more than one TDS wire format to a single message set. This enables
| you to transform messages from one tagged/delimited format to another.
| The following sections explain the TDS format in more detail, describe the values
| that you can set in the Control Center for the TDS wire format, and give an
| example of how the format can be used to model a message:
| v “TDS message characteristics”
| v “Setting properties for TDS wire format” on page 135
| v “Null handling with the TDS wire format” on page 144
| v “Multipart messages with the TDS wire format” on page 145
| v “Data conversion with TDS” on page 146
| v “Rules for TDS wire format properties” on page 146
| v “The relationship between the logical model and the TDS wire format” on
| page 149
| v “Industry standard formats” on page 150
| v “Example: modeling the Video customer message using TDS” on page 154
|
| TDS message characteristics
| There are a number of features of text string messages that are common across
| many formats. The following sections give an overview of the main features that
| are supported by the TDS wire format:
| v The text strings in the message can have a tag or a label preceding the data
| value. The tag is a string that uniquely identifies the data value. The TDS format
| allows you to associate a tag with each element when you define the element in
| the Control Center.
| v The message can contain various special characters or strings in addition to the
| tags and text string data values. The TDS format supports a number of different
| types of special characters or strings. Some messages have a special character or
| string that separates each data value from the next. In the TDS format this is a
| known as a delimiter. In formats that have a tag before each data value, the tag
| can be separated from its data value by a special character or string. In the TDS
| format this is known as a Tag Data Separator.
| v A message can be split into a number of substructures in a similar manner to a
| to COBOL or C structure. You can model each of these substructures separately
| by defining compound types or elements for each one. Compound types and
| elements are described in Chapter 4, “The MRM logical message model” on
| page 35. A substructure can have a special character or string that indicates its
| start within the data. This is known in the TDS format as a Group Indicator. A
| substructure can also have a special character or string that indicates its end in
| the data. In the TDS format this is known as a Group Terminator. A Group
| A small example data message is shown in Figure 23 with each of its components
| labelled:
| v At the top level, each data value has a tag associated with it, each tag is
| separated from its data value using a Tag Data Separator of colon (:), and the
| data values are separated from each other using the delimiter asterisk (*).
| v The Group Indicator for the message is the left brace ({) and the Group
| Terminator is the right brace(}).
| v The data values Data2 and Data3 are in a substructure in which there are no
| tags, and each data element is separated from the next using the delimiter plus
| (+). The Group Indicator for this substructure is the left bracket ([) and the
| Group Terminator is the right bracket (]).
| v The data values Data4 and Data5 are in a substructure in which the values are
| fixed length, and are therefore not separated by a delimiter. The Group Indicator
| for this substructure is the less than symbol (<) and the Group Terminator is the
| greater than symbol (>).
|
|
Delimiter Delimiter Delimiter
Tag Data Tag Data Tag Data
Separator Separator Separator
Tag Tag Tag
{Tag1:Data1*Tag2:[Data2+Data3]*Tag3:<Data4Data5>}
Group Group
Terminator Terminator
Group Group Group
Indicator Indicator Indicator
|
| Figure 23. Tags and special characters in a TDS message
| The following sections describe Data Element Separation and the special characters
| in more detail:
| v “Specifying data element separation methods to model a message” on page 133
| v “Specifying special characters to model a message” on page 134
|
| The methods that you can specify for each compound type are described below.
| The examples given are all based on a compound type that contains three elements
| of type STRING. The Tag Data Separator, where used, is the colon (:), and the
| Delimiter, where used, is the asterisk (*).
| Tagged Delimited
| Each data value is preceded by a tag that is specified in as an element
| property. If the tag is specified as fixed length, each data value follows
| immediately after the tag. If the tag is not specified as fixed length the tag
| is separated from the next element by a tag data separator. Each data value
| is separated from the next by a delimiter. There is no delimiter after the
| last element in the compound type.
| The following example shows tags of fixed length:
| tag1data1*tag2data2*tag3data3
| You can specify a special character value in one of the following ways:
| 1. As a literal string of one or more characters.
| 2. As a mnemonic value.
| 3. As a combination of both mnemonics and literals.
| You can model these formats by using a combination of the Data Element Separation
| method, the Delimiter value, the Group Indicator value, and the Group Terminator
| value.
| For the first example, specify Data Element Separation as All Elements Delimited,
| Delimiter as colon (:), and Group Indicator as colon (:).
| For the second example, specify Data Element Separation as All Elements
| Delimited, Delimiter as colon (:), and Group Terminator as colon (:).
| In addition to special characters, mnemonics can also be used in the message set
| Decimal Point, Escape Character, and Reserved Characters properties.
| For more details about the supported mnemonics, see Appendix B, “TDS
| Mnemonics” on page 251.
|
| Setting properties for TDS wire format
| The following sections describe the properties that you can set in the Control
| Center for the TDS wire format at each level within the MRM model to control the
| characteristics of the object. The values that you set for the message set are used as
| the default values for the corresponding properties for the compound type.
| v “Message set properties” on page 136
| v “Message properties” on page 138
| v “Type properties” on page 138
| v “Type member properties” on page 141
| v “Element properties” on page 141
| The property must have a non-empty value. It must start with a letter
| or an underscore (_), followed by alphanumeric characters, underscore
| (_) period (.), or hyphen (–).
| The wire format identifier is not the same as the name of the wire
| format layer (although you could define it to have the same value).
| When you create a wire format layer, you must enter a name, and this
| value is used for display purposes only in the Control Center to
| identify the tab on which the wire format layer properties are
| displayed. In all references outside the Control Center (for example, in
| the MQRFH2 header of a message) the wire format identifier must be
| used, not the name.
| Messaging Standard Enumerated Specify the standard to be used for this wire format layer. Select one of
| Type the following values from the drop-down list:
| ACORD AL3
| EDIFACT
| SWIFT
| UNKNOWN
| X12
| The value selected controls the default values for a number of the other
| properties.
| Default CCSID INTEGER CCSID (Coded Character Set Identification) specifies the mapping
| between character codes and symbols. You must specify a code set that
| is supported by WebSphere MQ Integrator (defined in the WebSphere
| MQ Integrator Administration Guide).
| This property stores the default CCSID for the message bit stream, but
| this value can be overridden when the message is processed.
| The trim of padding characters occurs from the left or right depending
| on the Justification property for the element.
| You might need to use this if you have data input that is mapped to a
| numeric simple type. For example, if the input data has leading spaces,
| you can set this property to Leading White Spaces to avoid data
| conversion problems processing these fields.
| Group Indicator STRING Specify the value of a special character or string that precedes the data
| belonging to a group or compound type within the bit stream.
| If you set the type property Group Indicator, it overrides this value.
| Group Terminator STRING Specify the value of a special character or string that terminates data
| belonging to a group or a compound type within the bit stream.
| If you set the type property Group Terminator, it overrides this value.
| Tag Data Separator STRING Specify the value of a special character or string that separates the Tag
| from the data. The Tag Data Separator and Tag Length properties are
| mutually exclusive.
| If you set the type property Tag Data Separator, it overrides this value.
| Tag Length INTEGER Specify the length of a tag value. When the message is parsed, this
| allows tags to be extracted from the bit stream if the Tag Data Separator
| property is not set.
| The Tag Data Separator and Tag Length properties are mutually exclusive.
| If you set the type property Tag Data Separator, it overrides this value.
| Delimiter STRING Specify the value of a special character or string that specifies the
| delimiter used between data elements.
| If you set a value for this property for the type, it overrides this value.
| Decimal Point STRING Specify the character that is used to separate the whole part of a
| number from its fraction.
| Escape Character STRING Specify the escape character that is used to allow special reserved
| characters (such as delimiters) to be included as part of data.
| Reserved Chars STRING Specify the special reserved characters that must be preceded by the
| escape character if they are to be included as part of the data.
| The Escape Character itself is usually also included in this list. If the set
| of reserved characters is to be updated dynamically (in the case of
| EDIFACT and X12 when delimiters and so on are specified in service
| strings), this list of reserved characters must be specified by the
| mnemonics supplied.
| Message properties
| Table 61. TDS: message properties
| Property Type Meaning
| Message Key STRING Specify a unique value that identifies the message in the bit stream. This
| property is required if the message is embedded within another message.
| For further information, see “Multipart messages with the TDS wire format”
| on page 145.
|
| Type properties
| Table 62. TDS: type properties
| Property Type Meaning
| Group Indicator STRING Specify the value of a special character or string that precedes the data
| belonging to a group or compound type within the bit stream.
| This property inherits, as default, the property value that you set for
| the message set. This is only valid if the type is a structure and not a
| simple type.
| This property inherits, as default, the property value that you set for
| the message set.
| This is only valid if the type is a structure and not a simple type.
| Tag Data Separator STRING Specify the value of a special character or string that separates the Tag
| from the data. If this property is set to a non NULL value, it overrides
| the Tag Data Separator property that you set for the message set.
| This property inherits, as default, the property value that you set for
| the message set.
| This is only valid if the type is a structure and not a simple type.
| Tag Length INTEGER If you specify a nonzero value, it overrides the corresponding message
| set property value. The Tag Length and Tag Data Separator properties for
| Type are mutually exclusive, and therefore you can specify a
| non-empty value for only one of these properties.
| This property inherits, as default, the property value that you set for
| the message set.
| This is only valid if the type is a structure and not a simple type.
| You must set a value if a length is required, and the Length property
| has a value of 0. You must specify a length if the Data Element
| Separation property is set to Fixed Length.
|
| Element properties
| Table 64 describes all possible properties that can be specified for an element.
| However, not all the properties are applicable to every type of element. Table 65 on
| page 144 shows which properties are displayed for each element type.
| Table 64. TDS: element properties
| Property Type Meaning
| Tag STRING Specify the Tag Value used to identify the element in a message bit stream If
| the element is simple and the Data Element Separation property of the
| compound type or types in which the element is a child is Tagged Delimited
| or Tagged Fixed Length, this property must contain a non-empty value.
| The value for this property must be unique for every element in the message
| set, that is, no two elements in the message set can contain the same value for
| this property.
| Length INTEGER Specify the expected length of the element in characters (except in the case of
| binary elements in which case the length value represents the length in bytes).
| If this property has a value of 0, the Length Value Of property is checked for a
| value.
| If the Data Element Separator property for the type (defined in Table 62 on
| page 138) is set to Fixed Length or Fixed Length AL3, either this property (or
| the Length Value of property) must contain a non 0 (or non NULL) value.
| Regardless of the value of the Data Element Separation property, if the type of
| the simple element is BINARY, either the Length or Length Value Of property
| must be set.
| This property is only used when a value is output as a fixed length string.
| Interpret Element Enumerated Specify if values stored within this element must be interpreted as having
| Value Type significance for the parser and, if so, the type of interpretation that must
| occur. This interpretation is generally standard specific and is therefore hard
| coded.
| If the VDP is a positive number, then the position of the decimal point is
| counted back from the right hand side of the number. For example, 1234,
| VDP=3 represents 1.234.
| If the VDP is negative, the decimal point is placed VDP number of places
| after the end of the number. For example, 1234, VDP = -3 represents 1234000.
| If the VDP is 0, the precision property is checked for the formatting of the
| FLOAT or DECIMAL element.
| Precision INTEGER Specify the number of digits that follow the decimal point.
| If Precision is greater than the number of digits following the decimal point,
| the FLOAT or DECIMAL is padded with additional zero digits after the
| decimal point. For example, for Number = 12.345 and Precision set to 5,
| Number becomes 12.34500 on output.
| If Precision is set to the mnemonic All Significant Digits (-1), all significant
| digits after the decimal point are written to the output bit stream.
| Format STRING Specify the format of the element. If the logical type of the element is
| DATETIME, this property can be set according to the standard described in
| the DATETIME section, for example, dd-MMM-yyyy.
| If the value for this property is set to None, this is interpreted as having no
| sign, and an exception is thrown if a negative number is processed (on either
| input or output).
| If the value for this property is set to Leading, this indicates that the sign is
| positioned ahead of the number, for example, –1234. Similarly, if this property
| is set to Trailing, the sign follows the number, for example, 1234–.
| For information about these options, see “Null handling with the TDS wire
| format” on page 144.
| Encoding Null STRING If you set the Encoding Null property to NULLPadFill, this property is disabled.
| Value
| If you set the Encoding Null property to NULLLogicalValue, you must set this
| property to an ISO8601 datetime format. These formats are described in note
| 6 on page 255 in “DATETIME as STRING data” on page 253. For example,
| specify a value conforming to yyyy-MM-dd’T’HH:mm:ss such as 1970-12-01.
| If you set the Encoding Null property to NULLLiteralValue, you must set this
| property to a value that conforms to the pattern that you have set in the
| propertyFormat. If you have set Physical Type to Fixed Length String, the
| value that you specify for this property must be of the same length as the
| field.
|
| Table 65 on page 144 outlines which of the element level properties are present for
| an element, depending on the logical type of the simple element, or, in the case of
| a compound element with a base type associated with it, depending on the logical
| type of the base type. In the case of an embedded simple type, or an embedded
| compound type with a base type associated with it, the presence or absence of
| these properties is applicable to the type member table.
| You can select the Encoding Null property from the three enumerated values
| NULLPadFill, NULLLogicalValue, and NULLLiteralValue:
| v You can use the NULLPadFill option only for fixed length elements. If you select
| this option, the element is filled with the value specified by the Padding Character
| property. If you select this option, the Encoding Null Value property is disabled.
| v If you select the NULLLogicalValue option, the value entered for the Encoding
| Null Value property is converted to its logical value. For writing, the logical
| value is written in the same way as any other value. For parsing, the converted
| logical value is compared against the converted message data.
| v If you select the NULLLiteralValue option, the value entered for the Encoding
| Null Value property is directly substituted as if it were a string value. For fixed
| length elements, the literal value must be of the same length as the element. The
| value is case insensitive.
| The use of the Encoding Null Value property is dependent on the value that you
| select for the Encoding Null property described above. NULL values are not defined
| for BINARY types. The properties Encoding Null and Encoding Null Value are
| therefore not set for BINARY types.
Message Header
Message Key
Message Body
Message Trailer
|
| Figure 24. TDS and multipart messages
|
| In this type of format, you can consider the Message Header and Message Trailer
| as an envelope for the message body. The Message Header and Message Trailer
| have a fixed format, but you can define the Message Body with different formats.
| The TDS format allows you to define an envelope Message containing the Message
| Header and Message Trailer definitions that includes a placeholder where the
| Message Body is to be defined. You can create this placeholder by inserting a
| compound type or compound element, with the Type Composition property set to
| Message, at the location where the Message Body is to be placed within the
| envelope Message definition. You must define each of the individual Message
| Bodies as separate Messages. You must define all Message Bodies in the same
| Message Set as the Envelope Message, unless they are self-defining. The wire
| format of the Envelope Message and the Message Bodies must all be TDS.
| An element in the Message Header contains a value that identifies the format of
| the Message Body. The MRM allows you to define an element in the envelope
| Message that has the element property Interpret Element Value set to Message Key.
| This element must be of type STRING. This element is used when the message is
| processed in the broker to locate the correct definition for the Message Body.
| Therefore the element in the Message Header that identifies the format of the
| message body must have its element property Interpret Element Value set to Message
| Key. This element must always precede the place in the envelope Message at which
| the Message Body is to be inserted.
| For example, assume you have defined a message that has property Message Key
| set to 100. If this is the message body that is included in the whole message when
| it is received by the broker, the element in the envelope message that has the
| property Interpret Element Value set to Message Key must have its value set to 100.
| General rules
| This section describes the general rules for each value that you can set for the Data
| Element Separation property of a type.
| Tagged Delimited
| v The Tag property for each and every simple child element must contain
| a non-empty value
| v The Delimiter property must contain a non-empty value
| Variable Elements Delimited
| The Delimiter property must contain a non-empty value.
| All Elements Delimited
| The Delimiter property must contain a non-empty value.
| Fixed Length
| All compound child elements with a non-boolean base type and
| non-boolean simple child elements must have either a nonzero value in
| their Length property, or a non-empty value for their Length Value Of type
| member property.
| Fixed Length AL3
| All compound child elements with a non-boolean base type and
| non-boolean simple child elements must have either a nonzero value in
| their Length property, or a non-empty value for their Length Value Of type
| member property.
| Tagged Fixed
| v All compound child elements with a non-boolean base type and
| non-boolean simple child elements must have either a nonzero value in
| their Length property or a non-empty value for their Length Value Of type
| member property.
| v The Tag property for each and every simple child element must contain
| a non-empty value.
| When the parser encounters the second asterisk delimiter, it determines that the
| last two elements of compound element C are not present, and the next element
| is the third element of P.
| 2. If the Delimiter of the compound type matches that of one of its parents, the
| truncation method cannot be used. This is because the parser cannot determine
| whether the delimiter after the last element is for the current compound type,
| Two delimiter characters have been inserted in the message data for the
| missing elements of compound element C. If the truncation method had been
| used, the parser would have interpreted the data value P3 as the value of the
| third element of compound element C and not the third element of compound
| element P.
|
| The relationship between the logical model and the TDS wire format
| There are a number of restrictions on the value that you can set for the Data
| Element Separation property for compound types, and the values that you can set
| for the Type Composition and Type Content defined in the logical model. These
| restrictions are listed in Table 67 and Table 68.
| Table 67. TDS permitted combinations of Type Composition and Data Element Separation
| Composition Tagged Delimited All Elements Fixed Length Fixed Length AL3 Tagged Fixed
| Delimited and
| Variable Elements
| Delimited
| Empty Allowed Allowed Allowed Allowed Allowed
| Choice Allowed Allowed Allowed Allowed Allowed
| Simple Allowed Not allowed Not allowed Not allowed Not allowed
| Unordered Set
| Unordered Set Allowed Not allowed Not allowed Not allowed Allowed
| Ordered Set Allowed Allowed Allowed Allowed Allowed
| Sequence Allowed Allowed Allowed Allowed Allowed
|
| Table 68. TDS permitted values for Type Content
| Composition Tagged Delimited All Elements Fixed Length Fixed Length Tagged Fixed
| Delimited and AL3
| Variable Elements
| Delimited
| Closed Allowed Allowed Allowed Allowed Allowed
| Open Defined Allowed Not allowed Not allowed Not allowed Allowed
| Open Allowed Not allowed Not allowed Not allowed Not allowed
|
| ACORD AL3
| The basic structure of an ACORD AL3 message is shown in Figure 25.
|
|
ACORD Message
Transaction Header Group Transaction Control Group ( OPTIONAL) Data Group Segments ( 1 Or More)
|
| Figure 25. ACORD AL3 message basic structure
|
| You can select the value Fixed Length AL3 for the Data Element Separation property
| for compound types within a message that conforms to the ACORD AL3 standard.
| This allows different versions of the ACORD AL3 standard to be supported using
| the same message set. This value is similar to the value Fixed Length except for
| the following:
| 1. A question mark (?) in the left-most position of an element means that it is
| skipped
| 2. A sequence of question marks is inserted for all missing optional elements.
| 3. Any <CR><LF> after the last element is ignored
| The Transaction Group contains other groups, and is therefore modeled in the
| same way as the overall message. The Message Header Group and the Message
| Trailer group just consist of fixed length elements, therefore the type used can be
| modeled as:
| Data Element Separation = Fixed Length
| EDIFACT
| The high level structure of an EDIFACT message is shown in Figure 26.
|
|
Interchange
Message Header - UNH ` Data Segment Data Segment Message Trailer- UNT `
Value Value
|
| Figure 26. EDIFACT message high level structure
|
|
|
|
| Figure 27. EDIFACT message display
|
| The message shown in Figure 27 has the following four children:
| v The embedded compound type Service String advice. Set the type properties as
| follows:
| Type Composition = Sequence
| Type Content = Closed
| Tag Length = 3
| Data Element Separation = Tagged Fixed Length
| v The Interchange Header element. Set the type properties as follows:
| Type Composition = Sequence
| Type Content = Closed
| Group Terminator = <EDIFACT_GROUP_TERM>
| Data Element Separation = All Elements Delimited
| Delimiter = <EDIFACT_DS>
| v The embedded compound type Segment 1. Set the type properties as follows:
| Type Composition = Choice
| Type Content = Closed
| Tag Data Separator = <EDIFACT_TAGDATA_SEP>
| Data Element Separation = Tagged Delimited
| Delimiter = <EDIFACT_CS>
| v The Interchange Trailer element. Set the type properties as follows:
| Type Composition = Sequence
| Type Content = Closed
| Group Terminator = <EDIFACT_GROUP_TERM>
| Data Element Separation = All Elements Delimited
| Delimiter = <EDIFACT_DS>
| Within an EDIFACT message, you can define the delimiters to be used in the
| message itself using the optional Service String Advice element. To enable this
| element to be recognized as an EDIFACT Service String, you must set the element
| property Interpret Element Value to EDIFACT Service String. You must also set the
| delimiter values to the mnemonic values that are defaulted when you set the
| Message Standard property to EDIFACT.
| You can model this setting the following type properties for the message:
| Data Element Separation = Tagged Delimited
| Group Indicator = {
| Delimiter = }{
| Group Terminator = }
| Tag Data Separator = :
| Each block is modeled as a compound element with element Tag property values
| of 1,2,3,4, and 5 respectively.
| You can model the compound type of the Text body by setting the following type
| properties:
| Data Element Separation = Tagged Delimited
| Group Indicator = <CR><LF>:
| Delimiter = <CR><LF>:
| Group Terminator = <CR><LF>–
| Tag Data Separator = :
| The Tag property of the elements within the body has values of 20, 32A, 72, and so
| on.
| X12
| If you are working with X12 messages, you can define the delimiters to be used in
| the message itself using the mandatory Interchange Control Header element. To
| enable this element to be recognized as an X12 Service String, you must set the
| element property Interpret Element Value to X12 Service String. You must also set
| the delimiter values to the mnemonic values defaulted by setting the Message
| Standard property to X12.
| A sample of the video customer message with the TDS format that is to be
| modeled is shown below (the data has been split into separate lines for
| readability):
| {Name:[Bloggs*Title:Mr*FirstName:Fred]&
| Address:[HouseNo:12*Street:Willow Avenue*Town:Salisbury]&
| PassportNo:NJ123456TT&
| Borrowed:[Gladiator+22-DEC-2001+3.00]&
| Borrowed:[Harry Potter+23-DEC-2001+3.75]&
| Magazine:1}
| Because the format of the message does not conform to an industry standard, you
| must set the property Messaging Standard to UNKNOWN. All of the delimiters for each
| type are specified explicitly for that type, they are not defaulted from the message
| set properties. The tables in this section, listed below, show the TDS properties that
| have been set for each component to model the message. Within each table, the
| characters n/a indicate that the property is not present for that element.
| v Message set properties, Table 70
| v Message properties, Table 71 on page 155
| v Type properties, Table 72 on page 155
| v Type member properties, Table 73 on page 155
| v Element properties, Table 74 on page 155, Table 75 on page 156, Table 76 on
| page 156, and Table 77 on page 157
| Table 70. Video customer example with TDS: message set properties
| Property Value
| TDS wire format identifier TDS
| Messaging standard UNKNOWN
| Default CCSID 367
| Trim Fix Len String No Trim
| Group Indicator
| Group Terminator
| Tag Data Separator
| Tag Length
| Delimiter
| Decimal Point .
| Escape Character
You are referred to the Control Center online help throughout this chapter: the
help contains reference information for the resources that you define and manage
using the Control Center. For examples, properties of message set, messages, and
so on that have specific values or ranges of values are detailed in the online help.
If you add layers to the message set after you have created lower level
components, you must check in all lower level components before you can do so.
When the layer has been added successfully, you must either check out and check
in the lower level components that you want to view or modify to refresh their
properties, or use the Refresh button, or select View—>Refresh from Shared.
v If this message set is to contain legacy messages (for example, if message
definitions are to be imported into this message set), you must add a CWF layer.
Right-click the message set, select Add—>Physical Format...—>Custom Wire
Format.... Enter a name for the format and click Finish. A new tab is created with
the name you specified. For details about the CWF layer, see Chapter 5,
“Working with a Custom Wire Format layer” on page 83.
You might also want to add a language binding to the message set for legacy
messages. To do this, select Add—>Language Binding...—>C Language... or
Add—>Language Binding...—>COBOL Language.... The dialog displays a fixed
name for the bindings (you cannot change this name). Click Finish. A new tab is
created with the fixed name.
You can add a language binding for both C and COBOL if you choose. However,
you can only add one for each language.
v If this message set is to contain tagged or delimited messages (for example,
SWIFT), you must add a TDS layer. Right-click the message set, select
Add—>Physical Format...—>Tagged/Delimited Format.... Enter a name for the
format and click Finish. A new tab is created with the name you specified. For
more details about the TDS layer, see Chapter 7, “Working with Tagged
Delimited String messages” on page 131.
v If this message set is to contain XML messages, you must add an XML wire
format layer. Right-click the message set, select Add—>Physical Format...—>XML
Format.... Enter a name for the format and click Finish. A new tab is created with
When you have added a physical format layer or a language binding to the
message set, you cannot remove it. You must delete the message set and recreate it
if you want to remove it. However, you do not have to use the layers that you
have added.
A locked entry appears under Message Sets root in the Message Sets pane. When
the new message set entry is highlighted in the Message Sets pane, its properties
appear in the Properties pane.
When you are ready to share a new message set with other Control Center users,
you can check it into the shared repository. You can do this before the message set
contains any message definitions, if you want. For more information about
checking in message sets, see “Checking in and checking out message sets and
components” on page 169.
Now that you have defined a message set, you are ready to define the messages
that will belong to it. This process is described in “Creating messages” on page 165.
At any time you can view the message set properties that have been set. If you
want to modify any of these properties, you must first check out the message set.
For details of the message set properties, see “Message set properties” on page 43.
When you add elements to a compound type after you have added a wire format
layer, you must check in the compound type before you can view or modify the
type member properties: these properties are not displayed when the type member
is created, but only when you check in the parent.
You can add more than one layer for each wire format if you choose. If you do so,
each name must be unique. You can also add more than one type of physical
format to a single message set if you choose.
For example, when converting from ASCII to code page 500, if you have specified
the numeric 8 as your padding character, this is converted from 0x08 to 0x16, the
ASCII and EBCDIC representations of ’back space’.
There is currently a restriction that the value of your padding character should not
be greater than 0x7F. Also you should note that if you enter a hexadecimal or
numeric value, it is considered to be the character represented by that number in
UTF-8.
If you add a language binding at the message set level, you can view, set, and
modify its properties. You can also view and modify properties at the category,
transaction, message, and element levels.
When you have created your message set, you can add one or two language
bindings. You are recommended to do this before you create the lower level
components of the message set: if you do so, the language bindings properties for
If you add a language binding to the message set after you have created lower
level components, you must check out these components to view the additional
properties.
You can only add one language binding per language per message set.
Creating messages
This section describes how to create a message, using the message shown in
Figure 21 on page 78 to illustrate the process. The example here uses only the basic
components and default properties of the MRM. You can add wire formats to these
components to refine the message definition and make it most appropriate for your
business and operating environment.
The Control Center provides a SmartGuide that you can use to create both
messages and compound types. For further information, see “Using the
SmartGuides” on page 168.
Table 78 indicates the high-level properties for the Video customer message.
| Table 78. The elements of the Video customer message
| Element Child Of Datatype Other properties
| Name STRING Holds surname, and can contain
| only those elements defined as
| children in the model
| Title Name STRING Maximum length of 3
| First Name Name STRING
| Address Can contain only those elements
| defined as children in the model
| HouseNo Address INTEGER
The Type Composition field specifies how this type is made up (the default is
Ordered Set). The Type Content field specifies how flexible the content of the type
can be (the default is Open). For further information about the values that you can
choose for these properties, and their meaning, see the Control Center online help.
Click Finish to create the compound type.
(The Type Composition of the parent compound type must be either Choice or
Sequence if the compound type contains another compound type.)
Repeat this procedure for all of the compound types in the message. They are
listed in Table 80. The Travel Request compound type is used as the type of the
whole message.
| Table 80. The Video customer elements with compound types
| Compound type Name Identifier Type Composition Type Content
| Name NameType Ordered Set Open
| Address AddressType Ordered Set Open
| IdType IdType Choice Closed
| Borrowed BorrowedType Sequence Closed
| CustomerType CustomerType Sequence Open
|
Reorder elements within compound types: The order of the elements in the
compound type is important because WebSphere MQ Integrator checks that the
order of the elements in the message that is received in the input node of a
message flow matches the order of the elements in the definition.
If you need to reorder elements within the compound types, follow the process
described in “Reordering elements in compound types” on page 171.
Create a category
| Right-click the message set and select Create—>Message Category. In the Create a
| new Message Category dialog, give the category a name and an identifier. For
| example you could call the category CustomerCategory and give it the identifier
| CustomerCategory. Click Finish to create the category.
| Add the message to the category: In the Categories folder, right-click the category
| and select Add—>Message. Select the Customer message.
You must ensure that the type containing the repeating elements is checked out. In
this example, the type Borrowed must be checked out to allow you to update the
Borrowed element to make it repeating.
For the Borrowed element, select the Connection tab in the properties pane. Update
the Repeat property to Yes and the Max Occurs property to 3. Click Apply.
You can also create this and other messages and compound types using the
SmartGuides.
You can also use the Compound Type SmartGuide to create compound types (this
also lets you create elements), and you can specify that you want the compound
type to also be created as a message.
The SmartGuide also allows you to reorder elements within the message or
compound type you are creating: this makes it easier to view and check the order
of elements while you complete the message or compound type structure.
The message set is checked into the shared configuration and is saved in the
message repository. It still appears in your workspace, but the Key icon against its
folder has disappeared. It is now unlocked.
When you check in a message set, any checked out objects in the message set are
not checked in by this action. You must check in these objects individually.
When you have checked in a message set, it is available to other users from the
shared configuration.
When you create components within the message set, you can create and check
these in individually. However, because components within a message set are very
often related and interdependent, the Control Center checks the status of other
components when you check in.
If other components must be checked in at the same time to preserve the integrity
of the message set, the Check In Confirmation dialog is presented. This contains a
list of all the objects that will be checked in on this one action, in addition to the
object that you selected.
If you do not want to check in all these objects at this time, you cannot check in
the original object. Click Cancel to terminate the check in request. If you can
confirm that you want all the listed objects to be checked in, click OK.
If you want to make further changes to the message set, you must first check it out
of the shared configuration:
1. In the Message Sets pane, right-click the folder of the message set you want to
edit.
2. Click Check Out.
The message set is checked out of the shared configuration. Its entry in the
Messages Pane has a Key icon against it to remind you that the definition is
checked out.
When you check out a message set, objects in the message set (messages, elements,
and so on) are not checked out by this action. You must check out these objects
individually.
You can check out any message component individually. You can also check out a
message, element, or compound type with its dependent hierarchy by selecting
Check Out List.... This option is only available for these three components. When
you select this option, the Check Out List dialog is displayed.
The dialog shows all the objects that are related in some way to the selected object.
For example, if you highlight a message and select this item, the compound type
for the message is also listed (even if you have not added it to your current
workspace).
The list of objects is displayed in a tree format, and reflects the order of folders in
the message tree in the left pane (within the folders, the objects are sorted by
name). The folders themselves are not eligible for selection. By default all items
If you click Check Out, the required check outs are performed. If some of the
items have not been checked out because they are already checked out to another
user, the operation completes, and an error message dialog is displayed showing
all the objects that could not be checked out, and the identity of the user that has
them locked.
Order can also be important if you define elements with a length or a repeat value
that is defined by another element (by setting the Length Type property to Value
Of, or the Repeat Count Type property to Value Of) in the CWF or TDS layers. If
you set Value Of, the element that defines the length or the number of repeats
must be in integer, and it must appear before the element that uses that value.
Therefore you might need to reorder the elements within the compound type to
ensure that this condition is met.
Right-click the compound type that you want to reorder, and select Reorder. The
Reorder Elements SmartGuide is displayed, and lists the elements that are defined
within the compound type. You can move these elements up or down to change
the order. You cannot add new elements using this option. You cannot reorder
external elements (those with the global icon).
Click Finish to confirm your new order: the new order is reflected in the tree in
the left pane.
Although you can undo many of the actions you can take in the Control Center,
you cannot undo the action if you have deleted a message set, deleted an element,
or deleted a compound type. Undo is available on the Edit menu, and is grayed
out if you cannot undo the action just completed.
All properties you can edit are displayed in the Properties pane of the Message
Sets view. For example, if you highlight an element in the Message Sets pane, its
properties, including those you can edit, are displayed in the Properties pane.
When you change the value of a property, click the Apply bar at the bottom of the
Properties pane to make the change take effect.
You can only edit a component’s properties or rename it if the component itself,
and any related component, is checked out.
Table 83 summarizes the available edit actions and shows for each action:
v Which component needs to be checked out.
v What happens when you make the change.
Table 83. Editing relationships and properties: check-out requirements
If you want to: You must check out: Then:
Edit the basic The component you You can edit the component and check it back in
properties of a want to edit
component
Edit the connection The compound type You can edit the connection tab then check the parent back in.
tab of a child element that is the parent of
the element
Edit the CWF of a The compound type You can edit the CWF tab then check the parent back in.
child element that is the parent of
the element
Edit the C language The component you You can edit all three tabs. The name is C-validated or COBOL
tab, COBOL language want to edit validated by the Control Center; you cannot click Apply if they are
tab, or Description tab invalid. If they are valid, you can check the component back in.
of a component
Edit an element The associated You can edit the message then check it back in.
qualifier assignment message
Delete an element Nothing If nobody has the element value checked out, the element value is
value from the deleted from the shared repository. If the element value has been
Element Values folder used to form a value constraint elsewhere in your message set,
highlighting the value constraint causes error message BIP0404E to
be displayed. Right-click the value constraint and select the only
option, Remove. If the element value is checked out, an error
message is displayed and you are not allowed to delete the element
value.
Remove an element Check-out status is The element value is removed from the workspace and there is no
value from the not significant change in the shared repository. The element value can be added to
Element Values folder. the workspace again.
Delete a compound Nothing If any user has an element or a message of this type checked out,
type from the Types or if any user has this type checked out an error message is
folder displayed and you are not allowed to delete. Otherwise, the type is
deleted and all elements of this type are also deleted throughout
the message set.
Remove a compound Check-out status is The type and its children are removed from the workspace under
type from the Types not significant the Types folder. Nothing else is affected. The compound type can
folder be added to the workspace again.
Remove a simple type Nothing The type is removed from the workspace under the Types folder.
from the Types folder Nothing else is affected. The simple type can be added to the
workspace again.
If you copy from one message set to another, you must ensure that the two
message sets have identical names for their wire format tabs (if present), and that
both have the same language bindings.
The message sets you selected to add are displayed in the Message Sets view. All
of the components of the message set (messages, elements, and so on) are now
available to your workspace, but are not automatically added. This is because
message sets can be very complex, and it is likely that you do not need to view or
access many of the subcomponents. If you add large numbers of components to
the workspace, this can cause slow response times and out-of-memory problems.
You can add just those components that you want to work with, or view, by
selecting the appropriate folder and adding the components when and as you need
them.
You can add categories, transactions, element qualifiers, messages, types, and
element values to your workspace in the same way.
The import function parses the source code files, isolates the data structure
definitions, and creates logical definitions that correspond to those data structures.
It also sets the appropriate wire format (CWF) properties to define the mapping
between the logical definitions and the physical message format, as defined by the
C or COBOL data structures.
A compound type is created for each data structure, and elements are created for
each field within the data structure. For more detailed information about the way
in which C and COBOL data structures are interpreted by the MRM language
importers, and a summary of the restrictions on the contents that you can
successfully import, see Chapter 9, “C and COBOL default mappings” on page 183.
When the import process is complete, you must create a message for each
compound type that defines a complete message (described in “Create the
message” on page 168): all other components are created automatically. However,
you are recommended to review your message definition, and edit it if necessary,
to ensure that it meets your needs.
Importing a DTD
You can import a DTD into the Control Center. This can be a DTD that you have
generated from this or another message repository (a procedure described in
“Generating MRM message set definitions in XML DTDs” on page 181), or a DTD
from another source. The DTD must be syntactically valid XML.
To import a DTD:
1. Select a message set into which you want to import the DTD. This can be a
new message set that you have created for this purpose, or an existing one to
which you want to add the DTD contents.
2. Select Import to Message Set—>DTD. The XML Import dialog is displayed.
3. Enter the fully qualified filename of the DTD that you want to import. If you
prefer, you can click Browse to locate the file on the Selector dialog. Select the
file that you want to import in the left pane, and click the >> button to add it
to the right pane. You can only select a single file.
4. Click OK. The fully qualified filename is displayed.
5. Click Next >>. The DTD importer parses the input file. If it encounters a
syntactical error, it displays an error message dialog and terminates the import
operation. Click OK when you have reviewed the message. You can click
Back to return to the previous display to select a new file to import, or to
correct the contents of the file.
6. If the file you have selected is parsed correctly, the importer displays the list
of elements contained in the DTD in the left pane on the XML Import dialog.
7. All the elements listed in the left pane are imported as elements in the
message set. If you want any of the listed elements to be imported as
messages, select the element and click the >> button to add it to the list in the
right pane. You can use the << button to move elements from the right pane
to the left pane.
8. You can click Back at any time to return to the previous display. You can click
Cancel to terminate the operation.
9. When you have the correct elements in each list, click Finish.
10. When the import has completed, click OK to return to the Message Sets view.
When you view the message set after import, the components that you selected as
elements have been created as elements, and the components that you selected as
Generating documentation
You can generate documentation in HTML format from the message set definitions
maintained in the message repository. Using the options available from the
Message Sets view, you can generate:
v A message book, which contains an entry for each message in a message set or
specified category, showing its hierarchical structure.
v A glossary, which contains descriptions of all elements in a message set or
specified category, ordered alphabetically by name.
The message book is generated and written to the specified location: the file
MRM-MAIN.HTML is created, along with a subdirectory named Private. This
subdirectory contains a large number of files, for example, image files and indexes.
Repeating elements are indicated by the characters *** after the element name.
Generating a glossary
To generate a glossary:
1. In the Message Sets pane of the Message Sets view, right-click the folder of the
message set or message category for which you want to generate
documentation.
2. Select Generate —> Documentation —> Glossary... from the action list of the
message set.
The Glossary dialog is displayed.
This dialog is identical to the Message Definition Book dialog, except that
only categories are available.
3. Complete the dialog and click Start.
The Glossary is generated and written to the specified location: the file
MAINGLOS.HTML is created, along with a subdirectory named Private. This
subdirectory contains a large number of files, for example, HTML files.
Individual COBOL data structure files are created from the message set. These files
are created with unique filenames, which are always the characters CS followed by
five numbers. The file type is CPY. For example, CS00005.CPY. A mapping file,
CSMAP.TXT, is also generated. This contains the names of the files generated, and
the associated structure names.
The language bindings files that are generated by this process do not map directly
to the content of the source message set and represent only an approximation of
the message structure. You are recommended to use the generated files for
documentation purposes only.
The run time dictionary for this message set is generated in the specified location.
The following files are also generated and are written to the directory
install_dir\log:
v rtderror.log. This file contains status messages about the generation of the run
time dictionary.
v rtd.trc. This file shows what has been extracted from the message repository
database for the run time dictionary file.
v rtd.txt. This formatted file shows the contents of the run time dictionary file.
An example of the generated file is shown in Figure 28 (the PDF data has been
truncated for simplicity):
<CMIResourceDeploymentTool>
<Deploy>
<MessageSet projectID="DIDA22006S001">
<MessageSetName>XYZ Corp business messages</MessageSetName>
<MessageSetLevel>1</MessageSetLevel>
<DefaultWireFormat>CWF</DefaultWireFormat>
<LogicalFormat encoding="PDF.hex"> 50df50df000002e80002000004e4000200000000000000010...
</LogicalFormat>
<WireFormat formatID="PDF"/>
<WireFormat formatID="CWF" encoding="PDF.hex"> 50df50df000002000002000004e4000200001...
</WireFormat>
<WireFormat formatID="CWF_hp_variant" encoding="PDF.hex"> 50df50df000002000002000004...
</WireFormat>
<WireFormat formatID="CWF_390_variant" encoding="PDF.hex"> 50df50df00000200000200000...
</WireFormat>
</MessageSet>
</Deploy>
</CMIResourceDeploymentTool>
To generate a DTD:
1. In the Message Sets pane of the Message Sets view, right-click the folder of the
message set for which you want to generate the DTD. Select Generate —>
DTD....
The Generate DTD dialog is displayed.
2. In the Generate DTD dialog, enter the name of the DTD file in the Generated
DTD Server Filename field. Click Start.
The DTD for this message set is generated as requested and written to the
specified location.
You can import the generated DTD file into another message set, or into another
message repository in a different broker domain. This procedure is described in
“Importing a DTD” on page 177.
For information about manipulating these messages in message flow nodes, see the
WebSphere MQ Integrator ESQL Reference.
Input nodes
If you are using messages in the MRM domain, you can use an MQInput node, an
MQeInput node, or a SCADAInput node to receive messages for processing by the
message flow.
For more information about configuring these input nodes, see the Control Center
online help.
Output nodes
You can include any of the output nodes in a message flow that processes
messages in the MRM domain. There are no special configuration requirements.
For more information about configuring the output nodes, see the Control Center
online help.
Other nodes
If you have predefined your message to the MRM, you can use any of the supplied
IBM primitive nodes. However, you cannot setup a message flow in which an
MRM message that includes repeating components is routed to one of the three
nodes that process NEONMSG domain messages (the NEONMap,
NEONRulesEvaluation, and NEONTransform nodes). If one of these nodes receives
an MRM message that includes repeating components, it produces unpredictable
results.
For more information about configuring these nodes, see the Control Center online
help.
184
C datatype MRM logical type Physical type Length Sign String justification Repeat
Long Integer Integer 4 Signed
Char String Fixed Length 1
Char[10] String Fixed Length 10 Left justify
Char[10][3] String Fixed Length 3 Left justify 10
Char[10][3][6] String Fixed Length 6 Left justify 30
Int Integer Integer 4 Signed
Int[2] Integer Integer 4 Signed 2
Int[2][3] Integer Integer 4 Signed 6
Unsigned Int Integer Integer 4 Unsigned
Unsigned Short Integer Integer 2 Unsigned
C and COBOL default mappings
185
Table 85. COBOL datatypes and their default settings in the MRM (continued)
186
1. COBOL 2. Permitted 3. PICTURE and 4. Value 5. Internal 6. MRM 7. Physical 8. Length in 9. Sign 10. 11. Pad. 12. Jst.
datatype symbols USAGE and optional representation Logical type type bytes Virtual char.
SIGN clause dec.
point
Internal 9 P S V If > 9 digits, Rounded down
Decimal float If a result of (Num
(Packed fraction, float of digits+2)/2
Decimal) Else integer
PIC S9999 +1234 01 23 4C integer packed 3 Y
PACKED-DECIMAL or decimal
COMP-3
-1234 01 23 4D
PIC 9999 1234 01 23 4F integer packed 3 N
PACKED-DECIMAL or decimal
C and COBOL default mappings
COMP-3
Internal
floating point
187
C and COBOL default mappings
The information provided here does not provide a full definition or description of
XML terminology, concepts, and message constructs: it is a summary that
highlights aspects that are important when you use XML messages with
WebSphere MQ Integrator. For further information about XML, see the IBM web
site at:
http://www.ibm.com/developer/xml
You can define XML messages to the MRM domain if you choose. For further
information, see Chapter 3, “The MRM domain” on page 23.
Overview
A self-defining XML message carries the information about its content and
structure within the message in the form of a document that adheres to the XML
specification. Its definition is not held anywhere else. When an XML message is
received by the broker, it is interpreted by the XML parser, and an internal
message tree structure is created according to the XML definitions contained within
that message.
A self-defining message is also known as a generic XML message. It does not have a
recorded format.
The name elements used in this description (for example, XmlDecl) are provided
by WebSphere MQ Integrator for symbolic use within the ESQL, and are referred
to as correlation names. The ESQL defines the processing of message content that
is to be performed by the nodes, such as a filter node, within a message flow. They
are not a part of the XML specification itself. You can find examples of ESQL
syntax in WebSphere MQ Integrator ESQL Reference.
The WhiteSpace elements within the tree are there because of the line breaks in the
original XML document, and have no business meaning. WhiteSpace within an
XML element does have business meaning and is represented using the Content
syntax element (described in “Content” on page 194). WhiteSpace and
DocTypeWhiteSpace are described in “WhiteSpace and DocTypeWhiteSpace” on
page 201.
| The correlation names for XML name elements (for example, Element and
| XmlDecl) equate to a constant value of the form 0x01000000. You can see these
| constants used in the output created by the Trace node when a message, or a
| portion of the message, is traced. These constants are defined in Appendix E of the
| WebSphere MQ Integrator Programming Guide.
XML Declaration
The beginning of an XML message can contain what is called an XML declaration.
An example of a declaration is included in Figure 29 on page 191.
XmlDecl
This is a name element that corresponds to the XML declaration itself. The
XmlDecl element is a child of the XML parser and is written to a bit stream first.
Although the XMLDecl element is a named element, its name has no relevance.
Version
The version element is a value element and stores the data corresponding to the
version string in the actual declaration. It is always a child of the XmlDecl element.
For example, for the declaration shown above the version element would contain
the string value ″1.0″.
Encoding
The encoding element is a value element and is always a child of the XmlDecl
element. The value of the encoding element is a string that corresponds to the
value of the encoding string in the declaration. In the example shown above the
encoding element would have a value of “UTF-8”.
“no” indicates that this XML document is not standalone and depends on an
externally defined DTD. “yes” indicates the XML document is self-contained.
However, the current release of WebSphere MQ Integrator does not resolve
externally defined DTDs. Therefore the setting of standalone is irrelevant and is
ignored.
XmlDec1
More complex XML messages might use some of the following syntax element
types:
v “CDataSection” on page 195
v “EntityReferenceStart and EntityReferenceEnd” on page 195
v “Comment” on page 196
v “ProcessingInstruction” on page 196
v “AsisElementContent” on page 197
Attribute
This syntax element is the default name-value element supported by the XML
parser. It is used to represent the attributes associated with its parent Element. The
name and value of the syntax element correspond to the name and value of the
attribute being represented. Attribute elements have no children, and must always
be children of an Element.
When Attributes are written to a message, occurrences of ampersand (&), less than
(<), greater than (>), double quote (“), and apostrophe (’) within the attribute value
are replaced by the predefined XML entities &, <, >, ", and '.
Content
This syntax element is the default value element supported by the XML parser. It
is used to represent character data (including white space) that is part of the
Element content. There might be many Content elements as children of a single
Element, in which case they are separated by other syntax element types such as
nested Elements or Attributes.
When Content is written to a message, occurrences of ampersand (&), less than (<),
greater than (>), double quote (“), and apostrophe (’) are replaced by the
predefined XML entities &, <, >, ", and '.
Element
- name=”person”
Content
- value=”Cormac Keogh”
CDataSection
CData sections in the XML message are represented by the CDataSection value
element. The content of the CDataSection element is the value of the CDataSection
element without the <![CDATA[ that marks the beginning, and without the ]]> that
marks the end of the Cdata section.
Unlike Content, occurrences of <, >, &, “, and ’ are not translated to their escape
sequences when the CDataSection is written out to a serialized message.
Figure 35 and Figure 36 on page 196 provide an example of the XML entity
references in an XML document and tree structure form.
Element
- name=”example”
The XML Declaration and the Document Type Declaration are not shown here.
Refer to “XML Declaration” on page 192 and “Document Type Declaration” on
page 198 for details of those sections of the syntax element tree.
Comment
When an XML comment is encountered outside of the Document Type Declaration,
it is represented by the Comment value syntax element. The value of the element
is the comment text from the XML message.
Element
- name=”example”
Comment
- value=” This is a comment ”
ProcessingInstruction
When an XML processing instruction is encountered outside of the Document Type
Declaration, it is represented by the ProcessingInstruction name-value syntax
element. The name of the syntax element is the processing instruction target name,
and the value of the syntax element is the character data of the processing
instruction. The value of the syntax element must not be empty. The name cannot
be ”XML“, or any uppercase or lowercase variation of ”XML“.
Figure 39 and Figure 40 on page 197 provide an example of the XML message body
in an XML document and tree structure form.
Element
- name=”example”
ProcessingInstruction
- name=”target
- value=”This is a PI.”
AsisElementContent
This syntax element is a special value element. It is used to precisely control the
XML generated in an output message without the safeguards of the normal
Element, Attribute, and Content syntax elements. If you use AsisElementContent, it
is your responsibility to ensure that the output message is well formed XML.
You might choose to use this syntax element, for example, if you want to suppress
the normal behavior in which occurrences of ampersand (&), less than (<), greater
than (>), double quote (“), and apostrophe (’) are replaced by the predefined XML
entities &, <, >, ", and '.
Only internal DTD subsets are represented in the syntax element tree. External
DTD subsets (identified by the SystemID or PublicId elements described below)
can be referenced in the message but those referenced are not resolved by the
broker.
DocTypeDecl
The DocTypeDecl is a named element and is a child of the XML parser. It is
written to the bit stream before the element that represents the body of the
document during serialization. The following can be specified within this element:
v “IntSubset”
v “PublicId”
v “SystemId”
IntSubset
IntSubset is a named element that groups all of those elements that represent the
DTD constructs contained in the internal subset of the message. Although the
IntSubset element is a named element its name is not relevant.
PublicId
PublicId represents a general public identifier construct found in an XML message.
It can be a part of a DocTypeDecl or a NotationDecl element. The value of the
PublicId is typically a URL.
SystemId
SystemId is a value element and is used to represent a general system identifier
construct found in an XML message. It can be a part of a DocTypeDecl or a
NotationDecl element. The value of the SystemId is a URI, and is typically a URL
or the name of a file on the current system. A system identifier of the form SYSTEM
“Note.dtd” has a string value of “Note.dtd”.
NotationDecl
The NotationDecl element represents a notation declaration in an XML message. It
is a name element whose name corresponds to the name given with the notation
declaration. It must have a SystemId as a child, and it can optionally have a child
element of type PublicId.
EntityDecl
The EntityDecl element represents a general entity and is declared in the internal
subset of the DTD. It is a named element and has a single child element which is
of type EntityDeclValue.
ParameterEntityDecl
The ParameterEntityDecl represents a parameter entity definition in the internal
subset of the DTD. It is a named element and has a single child element that is of
type EntityDeclValue. For parameter entities the name of the entity does not
include the percent sign %. In XML a parameter entity declaration takes the form:
<!ENTITY % inline "#PCDATA | emphasis | link">
ExternalParameterEntityDecl
The ExternalParameterEntityDecl represents a parameter entity definition where
the entity definition is contained externally to the current message. It is a named
element and has a child of type SystemId. It can also have a child of type PublicId.
The name of the entity does not include the percent sign %. In XML an external
parameter entity declaration takes the form:
<!ENTITY % bookDef SYSTEM "BOOKDEF.DTD">
ExternalEntityDecl
The ExternalEntityDecl element represents a general entity where the entity
definition is contained externally to the current message. It is a named element and
has a child of type SystemId. It can also have a child of type PublicId.
UnparsedEntityDecl
An unparsed entity is an external entity whose external reference is not parsed by
an XML processor.
EntityDeclValue
This value element represents the value of an EntityDecl, or a ParameterEntityDecl
defined internally in the DOCTYPE construct. It is always a child of an element of
one of those types, and is a value element. For the following entity:
<!ENTITY bookTitle "User Guide">
ElementDef
The ElementDef name-value element represents the <!ELEMENT construct in a DTD.
The name of the element that is defined corresponds to the name member of the
syntax element. The value member corresponds to the element definition.
AttributeList
The AttributeList name element represents the <!ATTLIST construct in a DTD. The
name of the AttributeList element corresponds to the name of the element for
which the list of attributes is being defined.
AttributeDef
The AttributeDef name element describes the definition of an attribute within a
<!ATTLIST construct. It is always a child of the AttributeList element. The name of
the syntax element is the name of the attribute being defined. It can have three
children:
v “AttributeDefValue”
v “AttributeDefDefaultType”
v “AttributeDefType”
AttributeDefValue
For attributes of type CDATA (see AttributeDefType below), or defined by an
enumerated list, the AttributeDefValue gives the default value of the attribute.
AttributeDefDefaultType
The AttributeDefDefaultType syntax element is a value element which represents
the attribute default as defined under the attribute definition. The value can be one
of the following strings:
v #REQUIRED
v #IMPLIED
v #FIXED
AttributeDefType
The AttributeDefType syntax element is a name-value element whose name
corresponds to the attribute type found in the attribute definition. Possible values
for the name are:
v CDATA
v ID
v IDREF
DocTypePI
The DocTypePI element represents a processing instruction found within the DTD.
The ProcessingInstruction element represents a processing instruction found in the
XML message body.
This element is a name-value element. The name of the element is used to store the
processing instruction target name, and the value contains the character data of the
processing instruction. The value of the element can be empty. The name cannot be
the string “XML” or any uppercase or lowercase variation of “XML”.
For example, white space within the body of the message is reported as element
content using the Content element type, but white space characters found between
the XML declaration and the beginning of the message body are represented by the
WhiteSpace element.
<?xml version=“1.0”?> <BODY>....</BODY>
The characters between “1.0”?>“ and <BODY> are represented by the WhiteSpace
element. White space characters found within a DocType between two definitions
are represented by the DocTypeWhiteSpace element.
<!ENTITY % bookDef SYSTEM "BOOKDEF.DTD"> <!ENTITY bookTitle "User Guide">
DocTypeComment
Comments in the XML DTD are represented by the DocTypeComment element. It
is a value element for which the value string contains the comment text.
When a message is parsed by the generic XML parser, the relevant part of the
message tree would look like this (assuming there are no carriage returns or white
space between tags):
XML
DocTypeDec1
- name=”test”
The IntSubset structure contains the following structures at the next level of
nesting: the tree structure for each of these is shown in Figure 43 on page 203.
NotationDecl
- name=”teX”
SystemId PublicId
- value=”//TexID” - value=”//this/is/a/URI/TexID”
EntityDecl
- name=”ent1”
EntityDeclValue
- value=”this is a entity”
ParameterEntityDecl
- name=”ent2”
EntityDeclValue
- value=”#PCDATA | subel2”
ExternalParameterEntityDecl
- name=”extent1”
SystemId PublicId
- value=”more.txt” - value=”//this/is/a/URI/extent2”
ExternalEntityDecl
- name=”extent2”
SystemId PublicId
- value=”more.txt” - value=”//this/is/a/URI/extent2”
UnparsedEntityDecl
- name=”unpsd”
DocTypeWhiteSpace
- value=” ”
DocTypePI
- name=”test”
- value=”Do this”
DocTypeComment
- value=”this is a comment”
ElementDef
- name=”subel2”
- value=”(#PCDATA)”
ElementDef
- name=”subel1”
- value=”Subel2 | el4”
ElementDef
- name=”el1”
- value=”(#PCDATA)”
ElementDef
- name=”el2”
- value=”(#PCDATA | Subel2)*”
ElementDef
- name=”el3”
- value=”(#PCDATA | Subel2)*”
ElementDef
- name=”el4”
- value=”(#PCDATA)”
ElementDef
- name=”el5”
- value=”(#PCDATA | Subel1)*”
ElementDef
- name=”el6”
- value=”(#PCDATA)”
AttributeList
- name=”Subel1”
AttributeDef AttributeDef
- name=”size” - name=”shape”
AttributeDefType AttributeDefValue
- value=”(big | small)” - value=”big”
AttributeDefDefaultType AttributeDefType
- value=”REQUIRED” - value=”(round | square)”
AttributeList
- name=”el5”
AttributeDef
- name=”el5satt”
AttributeDefType AttributeDefDefaultType
- name=”CDATA” - value=”IMPLIED”
Input nodes
If you are using messages in the XML domain, you can use any of the three
supplied input nodes (MQInput, MQeInput, or SCADAInput) to receive messages
for processing by the message flow. You can also provide your own plug-in input
node. For more information about supplied and plug-in input nodes, see “Using
the supplied input nodes and parsers” on page 8 and “Using plug-in nodes and
parsers” on page 10.
If you are using a plug-in input node, you must refer to the properties and
behavior of that node to determine how it must be customized to handle these
messages.
For more information about configuring these input nodes, see the Control Center
online help.
Output nodes
You can include any of the output nodes in a message flow that processes
messages in the XML domain. There are no special configuration requirements.
For more information about configuring the output nodes, see the Control Center
online help.
Other nodes
If you are using generic XML messages, you cannot use the following supplied
IBM primitive nodes, which require predefined messages to enable drag and drop
operations:
v DataDelete
v DataInsert
v DataUpdate
v Extract
v Warehouse
You can, however, achieve the function that these nodes provide by coding the
appropriate ESQL in a Compute or Database node. See the WebSphere MQ
Integrator ESQL Reference book for further guidance.
For more information about configuring these nodes, see the Control Center online
help.
You can define JMS messages to the MRM domain if you choose. For further
information, see Chapter 3, “The MRM domain” on page 23.
Input nodes
If you are using messages in the JMS domain, you can use any of the three
supplied input nodes (MQInput, MQeInput, or SCADAInput) to receive messages
for processing by the message flow. You can also provide your own plug-in input
node. For more information about supplied and plug-in input nodes, see “Using
the supplied input nodes and parsers” on page 8 and “Using plug-in nodes and
parsers” on page 10.
If you are using a plug-in input node, you must refer to the properties and
behavior of that node to determine how it must be customized to handle these
messages.
For more information about configuring these input nodes, see the Control Center
online help.
For more information about configuring the output nodes, see the Control Center
online help.
Other nodes
If you are using JMS messages, you cannot use the following supplied IBM
primitive nodes, which require predefined messages to enable drag and drop
operations:
v DataDelete
v DataInsert
v DataUpdate
v Extract
v Warehouse
You cannot use the following nodes, which depend on an MRM definition that
includes message set, type, and format identifiers:
v Check
v ResetContentDescriptor
You can, however, achieve the function that these nodes provide by coding the
appropriate ESQL in a Compute or Database node. See the WebSphere MQ
Integrator ESQL Reference book for further guidance.
For more information about configuring these nodes, see the Control Center online
help.
You must use the New Era of Networks graphical user interfaces to define the
messages to both domains, and to define the processing rules that are used by the
New Era of Networks nodes. The interfaces provided are the New Era of
Networks Formatter and the New Era of Networks Rules. These are accessible
from the Control Center, which also provides some support for these message
formats. For further details, see “Control Center support for New Era of Networks
messages” on page 227.
The message processing model in WebSphere MQ Integrator has three stages: the
incoming message is parsed, it is processed, and it is reserialized into an output
format. The processing stage takes place on a logical message model: a tree
structure that holds the data content of the message in a way that is independent
of the wire format.
The NEON parser cannot reserialize an output message: a message in the NEON
domain is simply reformatted from one wire format to another. The NEONMSG
parser can translate wire format messages in its domain into WebSphere MQ
Integrator message trees on input, and regenerate the message as a New Era of
Networks format on output. However, it can only reserialize messages defined as
outputs in the New Era of Networks Rules and Formats database, or messages
defined as input formats in the New Era of Networks Rules and Formats database,
that have not been modified by the message flow.
For further information about working with these messages, refer to the New Era of
Networks Rules and Formatter Support for WebSphere MQ Integrator User’s Guide.
For information about creating and accessing the New Era of Networks database,
in which these rules and formats are maintained, see the WebSphere MQ Integrator
Administration Guide.
This chapter discusses the two domains and the setup required for message flows
that process these messages:
v “The NEONMSG domain” on page 214
v “The NEON domain” on page 224
[-]...> CompoundIn1
|
[-]...> FlatIn1
| |
| |...> Field1
|
[-]...> FlatIn2
|
|...> Field2
The resulting message tree is like that shown in Figure 1 on page 13. The name of
the top-level format is omitted from the message tree because this information is
contained in the message properties. Each component input format becomes a
vertical level in the tree. Fields of a flat format become children of the format that
owns them.
For information about using ESQL to access New Era of Networks messages in
message processing nodes, see the WebSphere MQ Integrator ESQL Reference book.
Input nodes
If you are using messages in the NEONMSG domain, you can use an MQInput
node, an MQeInput node, or a SCADAInput node to receive messages for
processing by the message flow. You can also provide you own plug-in input node.
For more information about supplied and plug-in input nodes, see “Using the
supplied input nodes and parsers” on page 8 and “Using plug-in nodes and
parsers” on page 10.
| You can specify a field from the MQMD to determine the Message Set and Message
| Type, if appropriate. You can select one of:
| v $MQMD.Format
| v $MQMD.PutAplName
| v $MQMD.ApplIdentityData
| This behavior is consistent with the way in which the MQSeries Integrator Version
| 1 products set the default message set and message type. (If your New Era of
| Networks database is Oracle, you must ensure that these fields, if used, do not
| contain leading blanks.)
| If your incoming messages include NULL characters, these are not handled
| correctly by the NEONMSG parser. The NULL character is interpreted as a field
| terminator. You must modify these messages to use the data type Not Applicable
| to ensure that NULLs are handled and preserved in the data.
NEONTransform node
The NEONTransform node transforms a message from a known input format to a
specified output format using map objects that you must define using the New Era
of Networks Formatter user interface. These objects provide a way of explicitly
mapping input message fields to output message fields.
After mapping from input to output format, the NEONTransform node performs
the output operations specified for each field in the target format (also defined
using the New Era of Networks Formatter user interface). This might include
changing the data in some way. For example, if a field in an output format had an
upper casing output operation specified, the incoming data some data would be
turned by the NEONTransform node into SOME DATA when it was mapped to that
output format.
The output operations might also result in the adding of tags and delimiters to the
message data. For example, a field tagged by F: and delimited by a semicolon
character ; would appear in the output message as F:data;.
Both the input and output formats must be defined in the New Era of Networks
database. You can set properties in the NEONTransform node properties dialog to
influence the processing done by this node.
For more information about configuring the NEONTransform node, see the Control
Center online help.
Map Name and Map Version: You can identify the name and version of the map
that is to be used by the node in the Map Name and Map Version properties on the
Basic tab of the NEONTransform node properties. (Map Version is not operational
in the current release.)
See the New Era of Networks Rules and Formatter Support for WebSphere MQ Integrator
User’s Guide for more details of these values.
Output Domain: The Output Domain of a message can be set to either NEONMSG
(the default) or XML. A message with an Output Domain of NEONMSG is output
as a normal NEONMSG domain message. Any subsequent modification or
re-parsing of this message is done by the NEONMSG domain parser.
The outermost XML element consists of the outermost format name. The other
XML elements reflect the structure of the CompoundOut1 output format.
Output Message Type and Output Message Set: By default, the Message Type of
a message output from the NEONTransform node is set to the value of the Target
Format attribute in the message definition. If the Output Message Type property is
explicitly set to a different value, it sets up a delayed transform that is applied to
the message upon reserialization.
The Output Message Type and Output Message Set properties have no meaning
within the XML domain and therefore, although the Output Message Type and
Output Message Set standard properties are set in the output message as specified,
these values do not affect the subsequent processing of the XML message in any
way. If you set the Output Message Set property when the Output Domain is
NEONMSG, the application group (as defined in the New Era of Networks Rules
user interface) is changed to the group to which the message belongs.
This node differs from the NEONTransform in that it performs only the mapping
stage of a reformat and does not perform data transformation in the form of
output operations. Because of this, the output message from this node might not be
Refer to “NEONTransform node” on page 217 for properties that you can configure
for this node.
For more information about configuring the NEONMap node, see the Control
Center online help.
The Map and Transform actions defined in the rules process a message in an
identical way to the NEONMap and NEONTransform nodes respectively. Because
the NEONRulesEvaluation node processes a message tree (rather than the bit
stream processed by a NeonRules node), multiple Maps or Transforms can be
executed within a single subscription.
Given an input message of format Input1 with the bit stream body some data;, the
effect of applying two Reformat actions in the NeonRules node can be compared
against the effect of applying two Transform actions in the NEONRulesEvaluation
node:
Table 86. Comparison of the functions of the NEONRulesEvaluation node and NeonRules
node
NEONRulesEvaluation node NeonRules node
Transform Reformat
Target Format = Output1 INPUT_FORMAT = Input1
TARGET_FORMAT = Output1
PutQueue PutQueue
When serialized, the output wire When serialized, the output wire
format message body consists of: format message body consists of:
SOME DATA; SOME DATA;
Transform Reformat
Target Format = Output2 INPUT_FORMAT = Input1
TARGET_FORMAT = Output2
The Reformat action has to perform three steps: it must parse the incoming bit
stream, map the resulting input fields to the output format fields (applying any
output operations), and reserialize the output format fields into a new bit stream.
Because the Transform action works directly with message trees, it has no need to
perform the first and third of these steps, and therefore does not need to be told
the format of the input message.
Table 87 and Table 88 on page 221 show the result of each of the above actions:
Table 87. Behavior of the NeonRules node reformat action
Action Behavior
INPUT_FORMAT = Input1 v The incoming message bit stream, some
TARGET_FORMAT = Output1 data; is parsed as input format Input1,
generating the field Field1 with data some
data.
v Field1 from the input format is mapped
to Field2 in the output format Output1.
v Output1 is reserialized, with output
operations applied to produce the bit
stream
SOME DATA;
For more information about configuring the NEONRulesEvaluation node, see the
Control Center online help.
Propagate, Put Queue, and Route actions: The Propagate, Put Queue, and Route
actions all result in a message being propagated to the appropriate output terminal
of the NEONRulesEvaluation node. Therefore they all support the Message
Domain, Message Set, and Message Type options. These actions also support the
Output CCSID and Output Encoding attributes, which set the CCSID and
Encoding of the body of the outgoing message to the specified values.
Propagate
Put Queue
Route
The Route action causes a message to be output from the route terminal of the
NEONRulesEvaluation node. Before it is output, the DestinationList is updated to
reflect the value of the LabelName property. If the message output from the route
terminal subsequently reaches a RouteToLabel node, it might be routed to the
Label node with the name specified in the Label Name attribute, depending on
whether any other Label values have been appended to the DestinationList of the
message, and on the configuration of the RouteToLabel node.
Because the NEONMSG domain parser only reserializes output format message
trees, or input format messages that have a valid bit stream associated with them,
it is only possible to create NEONMSG messages which are defined as output
formats in the New Era of Networks database: input format messages cannot be
created.
When a NEONMSG message is created in this way, the output controls associated
with the format of the created message (as defined by the New Era of Networks
Formatter) are not applied to the message data until it is reserialized. Thus if
Field1 had an associated output control to upper case the contents of the field,
querying the contents of Field1 as it passed through the message flow would show
the value ‘some data’. However, when the message was reserialized and placed on
an output queue, the contents of the field would be ‘SOME DATA’.
For more information about configuring the Compute node, see the Control Center
online help. For an example of creating a NEONMSG in the Compute node, see
the WebSphere MQ Integrator ESQL Reference.
Output nodes
You can include any of the output nodes in a message flow that processes
messages in the NEON domain. There are no special configuration requirements.
For more information about configuring the output nodes, see the Control Center
online help.
You can, however, achieve the function that they provide by coding the
appropriate ESQL in a Compute or Database node. See the WebSphere MQ
Integrator ESQL Reference book for further guidance.
For more information about configuring these nodes, see the Control Center online
help.
This parser handles messages that can be processed in the NeonFormatter and
NeonRules nodes.
A NEON domain message can also be handled by all other IBM-supplied message
processing nodes, with the exception of the NEONMap, NEONRulesEvaluation,
and NEONTransform nodes (which handle only messages in the NEONMSG
domain). The whole message can be stored in a database, and headers can be
added to or removed from the message as it passes through the message flow.
However, no other nodes can manipulate the message contents.
You are recommended to use the NEONMSG parser, and the NEONMap,
NEONRulesEvaluation, and NEONTransform nodes for all new message flows in
preference to the NEON parser and the NeonFormatter and NeonRules nodes,
because the NEONMSG parser and its nodes provide richer message processing
function.
If an MQRFH is included in the message, but the input node has not defined the
message domain, the domain NEON is assumed and no error is generated.
The NEON parser cannot reserialize an output format message, therefore the
NeonFormatter node generates an already-serialized bit stream, rather than a
message tree, as the body of its output message.
When this message is parsed by the NEON parser, the following is generated:
(0x1000000)NEON = (
(0x3000000)Field1 = ’some data’
(0x3000000)Field2 = ’some more data’
)
Input nodes
If you are using messages in the NEON domain, you can use an MQInput node,
an MQeInput node, or a SCADAInput node to receive messages for processing by
the message flow. You can also provide you own plug-in input node. For more
information about supplied and plug-in input nodes, see “Using the supplied
input nodes and parsers” on page 8 and “Using plug-in nodes and parsers” on
page 10.
| This behavior is consistent with the way in which the MQSeries Integrator Version
| 1 products set the default message set and message type. (If your New Era of
| Networks database is Oracle, you must ensure that these fields, if used, do not
| contain leading blanks.)
| If your incoming messages include NULL characters, these are handled correctly
| by the NEON parser.
For more information about configuring these input nodes, see the Control Center
online help.
NeonFormatter
The NeonFormatter node provides message processing function that is a subset of
that provided by the NEONMap and NEONTransform nodes. It has the following
properties:
v Target Format. This determines the format of the output message. The output
format must be defined in the New Era of Networks database.
v Output format properties. These can be set in the same way as the equivalent
NEONTransform node properties:
– “Output Domain” on page 217
– “Output Message Type and Output Message Set” on page 218
For more information about configuring the NeonFormatter node, see the Control
Center online help.
NeonRules
The NeonRules node provides message processing function that is a subset of that
provided by the NEONRulesEvaluation node. The two nodes are compared in
“The NEONRulesEvaluation node” on page 219. In particular, note that the option
of specifying a numeric value for the MQS Expiry attribute for the the PutQueue
and Propagate actions is not supported.
For more information about configuring the NeonRules node, see the Control
Center online help.
Output nodes
You can include any of the output nodes in a message flow that processes
messages in the NEON domain. There are no special configuration requirements.
Other nodes
If you are using messages defined to the NEON domain, the following supplied
IBM primitive nodes provide no significant function:
v Check
v DataDelete
v DataInsert
v DataUpdate
v Extract
v Warehouse
For more information about configuring these nodes, see the Control Center online
help.
The BLOB message body parser does not create a tree structure in the same way
that other message body parsers do. It has a root element “BLOB”, that has a child
element, also called “BLOB”, that contains the data.
For more information and examples of how you can use ESQL to manipulate the
content of BLOB messages, see the WebSphere MQ Integrator ESQL Reference book.
Input nodes
If you are using messages in the BLOB domain, you can use any of the three
supplied input nodes (MQInput, MQeInput, or SCADAInput) to receive messages
for processing by the message flow. You can also provide your own plug-in input
node. For more information about supplied and plug-in input nodes, see “Using
the supplied input nodes and parsers” on page 8 and “Using plug-in nodes and
parsers” on page 10.
If you are using a plug-in input node, you must refer to the properties and
behavior of that node to determine how it must be customized to handle these
messages.
For more information about configuring these input nodes, see the Control Center
online help.
Output nodes
You can include any of the output nodes in a message flow that processes
messages in the BLOB domain. There are no special configuration requirements.
For more information about configuring the output nodes, see the Control Center
online help.
The Control Center online help has information about setting the MQOutput node
properties that correspond to the values set in the fields listed here.
Table 91. Data types for elements in the DestinationData folder
Data type of the element Represented as
queueManagerName CHARACTER
The UnknownParserName field, if present, contains the class name of the parser
that would have been chosen in preference to the BLOB parser. This information is
used by the header integrity routine (described in “Maintaining header integrity”
on page 9) to ensure that the semantic meaning of the message is preserved.
For further information about this header and its contents, see the MQSeries
Programmable System Management book.
Other name value elements might be present that contain information as parsed
from or destined for the option buffer. See the Rules and Format header
documentation for specific names and values.
Other name and child name value elements might be present that contain
information as parsed from or destined for the option buffer. See the WebSphere
MQ Integrator Programming Guide for further information about this header.
| The defaults that are set for each message set property that relates to DATETIME,
| for each physical representation (CWF, TDS, XML), are defined in “Message set
| defaults” on page 257.
|
| DATETIME as STRING data
| If the DATETIME element is CWF Packed Decimal, you can only use the symbols
| that are presented as numbers. For all other Physical Type options, you can use all
| symbols.
| You can specify the DATETIME format using a string of pattern letters. The count
| of pattern letters determines the format. Table 108 defines the letters that are
| reserved as pattern letters.
| Table 108. DATETIME formatting symbols
| Symbol Meaning Presentation Example
| y year Number 1996¹
| Y year: use with week in year only Number 1996¹²
| M month in year Text and Number July and 07
| d day in year Number 10
| h hour in am or pm (1–12) Number 12
| H hour in day (0–24) Number 0
| k hour in day (1–24) Number 24
| K hour in am or pm (0–11) Number 0
| m minute in hour Number 30
| s second in minute Number 55
| S millisecond Number 978
| E day in week Text Tuesday
| The following points explain the notes in Table 108 on page 253:
| 1. Year is handled as a special case:
| v On output, if the count of y is 2, the year is truncated to 2 digits. For
| example, if yyyy produces 1997, yy produces 97.
| v On input, for 2 digit years the CWF message set property of Century Window
| is used to determine the century. For example, if Century Window is set to 53,
| year 97 is 1997, year 52 is 2052, and year 52 is 1953.
| 2. The first day of a year does not usually fall on a week boundary, therefore
| dates expressed using week in year might refer to dates in neighboring years.
| For example, day 1 of week 1 in 2002 (2002 01 Monday) using format string
| YYYY ww EEEE is in fact 31st December 2001. If you use Y, if the day of week (E)
| and week in year (w) are adjusted if necessary to indicate that the date falls in
| the previous year. If you use the y symbol, the adjustment is not done and
| unpredictable results could occur for dates around year end.
| For example, if the string 2002 01 Monday is formatted:
| v day 1 of week 1 in 2002 using format string YYYY ww EEEE is correctly
| interpreted as 31st December 2001
|
| Figure 47. ISO8601 datetime examples
|
| Here are several examples of DATETIME formats:
| Table 109. DATETIME formatting examples
| Format pattern Result
| ″yyyy.MM.dd’at’HH:mm:ss ZZZ″ 1996.07.10 at 15:08:56 –05:00
| EEE, MMM d, ″yy″ Wed, July 10, ’96
| ″h:mm a″ 8:08 PM
| ″hh ’o’’clock’ a, ZZZZ″ 09 o’clock AM, +09:00
| ″K:mm a, ZZZ″ 9:34 AM, –5:00
| ″yyyy.MMMMM.dd hh:mm aaa″ 1996.July.10 12:08 PM
|
| The following example shows the C language structure tm with an integer of four
| bytes:
| struct tm
| { int tm_sec; /* seconds after the minute - [0,59]*/
| { int tm_min; /* minutes after the hour - [0,59]*/
| { int tm_hour; /* hours since midnight - [0,23]*/
| { int tm_mday; /* day of the month - [1,31]*/
| { int tm_mon; /* months since January - [0,11]*/
| { int tm_year; /* years since 1900 */
| { int tm_wday; /* days since Sunday - [0,6]*/
| { int tm_yday; /* days since January 1 - [0,365]*/
| { int tm_isdst; /* daylight savings time flag */
| };
| The epoch (time 0) is specified by the format string. This has the default value of
| 1970-01-01T00:00 +00:00. You can specify other epoch strings, which must
| conform to the format pattern ″yyyy-MM-dd’T’HH:mm ZZZ″.
|
| DATETIME component defaults
| Default values are assumed if any part of a DATETIME element is not present on
| input. For example, the formatting string yyyy–MM’T’HH:mm does not contain any
| information about day in month (d), seconds (s), or milliseconds (S).Table 111
| shows the defaults for all DATETIME components
| Table 111. DATETIME component defaults
| Component Default value
| Year Current year
| Month First month of year
| Day First day of month
| Hour First hour of day
| Minute Minute 0 of hour
| Second Second 0 of minute
| Millisecond Millisecond 0 of second
|
|
| Message set defaults
| Table 112 shows the default DATETIME formatting symbols for the different
| physical message representations.
| Table 112. Message set defaults for DATETIME
| Message set property CWF default TDS default XML default
| Default DateTime Format yyyy-MM- yyyy-MM- yyyy-MM-
| dd’T’HH:mm:ssZZZ dd’T’HH:mm:ssZZZ dd’T’HH:mm:ssZZZ
| Default Time Zone ID +00:00 +00:00 +00:00
| Century Window 53 20 20
| First Week of Year 4 4 4
| First Day of Week Monday Monday Monday
|
| You can update these default values for CWF, but not for TDS or XML. These
| defaults are set for all values of the Physical Type property. If you change the CWF
| Physical Type to Binary, Packed Decimal, TimeSeconds, or TimeMilliseconds, you
| must update the Default DateTime Format property manually to ensure consistent
| results.
| For more information about these message set properties, see “Message set
| properties for CWF” on page 83 (CWF), “Message set properties” on page 136
| (TDS), or “Message set properties for XML” on page 112 (XML).
IBM may have patents or pending patent applications covering subject matter
described in this information. The furnishing of this information does not give you
any license to these patents. You can send license inquiries, in writing, to:
IBM Director of Licensing
IBM Corporation
North Castle Drive
Armonk, NY 10504-1785
U.S.A.
For license inquiries regarding double-byte (DBCS) information, contact the IBM
Intellectual Property Department in your country or send inquiries, in writing, to:
IBM World Trade Asia Corporation
Licensing
2-31 Roppongi 3-chome, Minato-ku
Tokyo 106, Japan
The following paragraph does not apply to the United Kingdom or any other
country where such provisions are inconsistent with local law:
INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS
PUBLICATION “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER
EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS
FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or
implied warranties in certain transactions, therefore this statement may not apply
to you.
Any references in this information to non-IBM Web sites are provided for
convenience only and do not in any manner serve as an endorsement of those Web
sites. The materials at those Web sites are not part of the materials for this IBM
product and use of those Web sites is at your own risk.
IBM may use or distribute any of the information you supply in any way it
believes appropriate without incurring any obligation to you.
The licensed program described in this information and all licensed material
available for it are provided by IBM under terms of the IBM Customer Agreement,
IBM International Programming License Agreement, or any equivalent agreement
between us.
Trademarks
The following terms are trademarks of International Business Machines
Corporation in the United States, other countries, or both:
Java and all Java-based trademarks and logos are trademarks or registered
trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.
Microsoft, Windows, Windows NT, and the Windows logo are trademarks of
Microsoft Corporation in the United States, other countries, or both.
UNIX is a registered trademark in the United States and other countries licensed
exclusively through The Open Group.
Other company, product, and service names may be trademarks or service marks
of others.
AMI. Application Messaging Interface. configuration repository. Persistent storage for broker
configuration and topology definition.
Application Messaging Interface (AMI). The
programming interface provided by MQSeries that connector. See message processing node connector.
defines a high level interface to message queuing
content-based filter. An expression that is applied to
services. See also MQI and JMS.
the content of a message to determine how the message
is to be processed.
B
context tag. See element qualifier.
BLOB. Binary Large OBject. A block of bytes of data
Control Center. The graphical interface that provides
(for example, the body of a message) that has no
facilities for defining, configuring, deploying, and
discernible meaning, but is treated as one solid entity
monitoring resources of the WebSphere MQ Integrator
that cannot be interpreted.
network.
broker. See message broker.
callback function. See implementation function. debugger. A facility on the Message Flows view in the
Control Center that enables message flows to be
category. An optional grouping of messages that are debugged.
related in some way. For example, messages that relate
to a particular application. deploy. Make operational the configuration and
topology of the broker domain.
DTD. Document Type Definition. filter. An expression that is applied to the content of a
message to determine how the message is to be
processed.
E
format. A format defines the internal structure of a
e-business. A term describing the commercial use of message, in terms of the fields and order of those
the Internet and World Wide Web to conduct business fields. A format can be self-defining, in which case the
(short for electronic-business). message is interpreted dynamically when read.
execution group. A named grouping of message flows implementation function. Function written by a
that have been assigned to a broker. The broker is third-party developer for a plug-in node or parser. Also
guaranteed to enforce some degree of isolation between known as a callback function.
message flows in distinct execution groups by ensuring
that they execute in separate address spaces, or as input node. A message flow node that represents a
unique processes. source of messages for the message flow.
Extended SQL. A specialized set of SQL functions and installation mode. The installation mode can be Full,
statements based on regular SQL, extended with Custom, or Broker only. The mode defines the
functions and statements unique to WebSphere MQ components of the product installed by the installation
Integrator. process on Windows NT systems.
local environment. Information associated with a message flow. A directed graph that represents the set
message while it is being processed by a message flow. of activities performed on a message or event as it
This information includes: passes through a broker. A message flow consists of a
v User-defined variable information that can be created set of message processing nodes and message
and used by nodes within the message flow. processing node connectors.
v A user-defined list of internal and external
message flow component. See message flow.
destinations to which a message is sent. These can be
nodes within a message flow (for example, when message parser. A program that interprets the bit
using the RouteToLabel and Label nodes) or stream of an incoming message and creates an internal
MQSeries queues (when the list is examined by an representation of the message in a tree structure, and
MQOutput node to determine the final target for the that regenerates a bit stream for an outgoing message
message). from the internal representation.
v A list of destinations to which a message has been
sent. This list is created by an output node only if it message processing node. A node in the message
is connected to another node in the message flow. flow, representing a well defined processing stage. A
message processing node can be one of several
Also known as destination list in previous MQSeries primitive types or can represent a subflow.
Integrator releases. Destination list is valid and can be
used for compatibility. message processing node connector. An entity that
connects the output terminal of one message processing
local error log. A generic term that refers to the logs node to the input terminal of another. A message
to which WebSphere MQ Integrator writes records on processing node connector represents the flow of
the local system. control and data between two message flow nodes.
v On UNIX systems, this is the syslog.
v On Windows NT, this is the Event Viewer message queue interface (MQI). The programming
(Application View). interface provided by MQSeries queue managers. The
v On z/OS systems, this is the operator console. programming interface allows application programs to
access message queuing services. See also AMI and
Entries written to this log include records that provide JMS.
information about events that are not errors, but that
occur normally during operation, for example, message repository. A database holding message
successful deployment of a configuration. template definitions.
message broker. A set of execution processes hosting message set. A grouping of related messages.
one or more message flows.
message template. A named and managed entity that
messages. Entities exchanged between a broker and its represents the format of a particular message. Message
clients. templates represent a business asset of an organization.
metadata. Data that describes the characteristic of POSIX. Portable Operating System Interface For
stored data. Computer Environments. An IEEE standard for
computer operating systems (for example, AIX and
MQI. Message queue interface. Solaris).
MQIsdp. WebSphere MQ Integrator SCADA device predefined message. A message with a structure that
protocol. A lightweight publish/subscribe protocol is defined before the message is created or referenced.
flowing over TCP/IP. Compare with self-defining message.
MQRFH. An architected message header that is used primitive. A message processing node that is supplied
to provide metadata for the processing of a message. with the product.
This header is supported by MQSeries
Publish/Subscribe. principal. An individual user ID (for example, a log-in
ID) or a group. A group can contain individual user
MQRFH2. An extended version of MQRFH, providing IDs and other groups, to the level of nesting supported
enhanced function in message processing. by the underlying facility.
MQSeries Everyplace™. A generally available property. One of a set of characteristics that define the
MQSeries product that provides proven MQSeries values and behaviors of objects in the Control Center.
reliability and security in a mobile environment. For example, message processing nodes and deployed
message flows have properties.
MRM. Message Repository Manager.
publication node. An end point of a specific path
multilevel wildcard. A wildcard that can be specified through a message flow to which a client application
in subscriptions to match any number of levels in a subscribes. A publication node has an property,
topic. subscription point. If this is not specified, the
publication node represents the default subscription
N point for the message flow.
W
warehouse. A persistent, historical datastore for events
(or messages). The Warehouse node within a message
flow supports the recording of information in a
database for subsequent retrieval and processing by
other applications.
X
XML. Extensible Markup Language.
Bibliography 277
MQSeries on the Internet
Index 281
message set property (continued) message type (continued) MRM domain (continued)
Byte Alignment Pad 85 predefined 4 designing new messages 32
Byte Order 84 self-defining 4 element 45
Century Window 85 supported 4 element qualifier 56
Custom Wire Format Identifier 84 undefined (BLOB) 4 element value 59
Decimal Point 137 messages, defining in MRM 159 ESQL 69
Default CCSID 84, 136 messaging standard example logical message model 66
Default DateTime Format 85 tagged/delimited identifier 39
Default null permitted 43 ACORD AL3 32 identifying message in input node 27
Default Time Zone ID 85 EDIFACT 32 identifying message in MQRFH2 27
Default wire format 43 SWIFT 32 identifying message to broker 27
Delimiter 137 UNKNOWN 32 implications for different wire
DOCTYPE Public ID 112 X12 32 formats 63
DOCTYPE System ID 112 mnemonic, TDS input node properties 70
DOCTYPE Text 113 name 135 logical message model 25, 27
Enable versioning support 113 symbols 251 logical message representation 25
Encoding Null Non-Num 114 Unicode character 135 managing message sets 76
Encoding Null Non-Num Val 114 MQCFH, parser 238 member of relationship 62
Encoding Null Num 114 MQCIH, parser 239 message 47
Encoding Null Num Val 114 MQDLH, parser 240 message dictionary 24
Escape Character 137 MQFMT_IMS_VAR_STRING, message example 26
Finalized 43 restrictions 9 message model objects 39
First Day of Week 86 MQIIH, parser 241 message set 41
First Week of Year 85 MQMD, parser 242 message set assignment 24
Float Format 84 MQMDE, parser 244 message tree 24
Freeze timestamp 43 MQRFH, parser 245 modeler 24
Group Indicator 137 MQRFH2 MQRFH2 properties 70
Group Terminator 137 identifying MRM message 27 name 39
Identifier 43 MQRFH2, parser 246 naming conventions 33
Input Compression Technique 138 MQRMH, parser 247 null handling 64
Level 43 MQSAPH, parser 248 null handling, base types 66
Message Type Prefix 44 MQSeries Everyplace publications 275 object relationships 62
Messaging Standard 136 MQSeries header parsers 8 organizing messages 33
Name 43 MQSeries header, data type of fields 236 parser 24
Output Compression Technique 138 MQWIH, parser 249 physical message representation 25
Packed Decimal Byte Order 84 MRM physical representation
Reserved Chars 137 creating a complex message 38 CWF 32
Root tag name 113 creating a logical message model 37 TDS 32
run time parser 42 creating a multipart message 38 XWF 32
Standalone document 112 creating a simple message 38 planning a message model 32
Suppress DOCTYPE 112 defining if nulls are permitted 64 predefined message 63
Suppress XML declaration 112 definition 23 reference relationship 62
Tag Data Separator 137 logical message model 35 referencing base types with ESQL 72
Tag Length 137 logical model referencing choice compound type
TDS Wire Format Identifier 136 compound type 27 with ESQL 73
Trim Fix Len String 137 element 28 referencing compound types with
XML Wire Format Identifier 112 message 27 ESQL 73
message set state, MRM 76, 174 message set 27 referencing elements with ESQL 71
message set version, MRM 77, 161 simple type 27 referencing embedded messages with
message structure the message set in the Control ESQL 73
environment tree 14 Center 36 referencing simple types with
exception list tree 16 utilities 30 ESQL 72
local environment tree 14 MRM domain reusing existing messages 32
message tree 12 accessing base types from message reusing types and elements 37
tree format 11 flow 69 self-defining message 63
message tree accessing compound types from setting the value of null 65
access by message flow nodes 11 message flow 69 sparse message 64
copying input data to output data 11 accessing element from message transaction 58
correlation names 12 flow 68 type 49
exception handling 11, 16 accessing simple types from message writing output message 24
headers 12 flow 69 MRM element
properties 12 base type 49 duplicate 52, 54
root 12 broker’s view of the logical message identifier 40
structure 11 model 66 mandatory 28
message type category 55 optional 28
definition 3 data conversion 66 repeating 28, 46, 52, 54, 168
identifying for MRM message 27 defining language bindings 33 restrictions 45, 56, 59
Index 283
S TDS (continued)
null handling 144
Type Content
Closed 52, 53, 124
self-defining element, MRM 111 omission 148 Open 52, 53, 124
self-defining message, MRM 63 permitted options for nested Open Defined 53, 124
self-defining messages 191 compound types 147 Opendefined 52
simple type, characteristics 49 permitted values for type permitted values for TDS 149
SmartGuide composition 149 type member properties, TDS 141
create a compound type 168 permitted values for type type member property
creating a message 168 content 149 BINARY
SMQ_BMH, parser 250 relationship with logical model 149 Byte Alignment 87
softcopy books 276 Reserved Characters 135 Length Count 86
sparse message rules 146 Length Type 86
support in MRM 64 setting properties 135 Length Units 86
states of message set 76 STRING element properties 143 Length Value Of 86
STRING element properties, TDS 143 SWIFT 153 Physical Type 86
SupportPac 277 tag 131 Repeat Count 87
SWIFT 153 tag data separator 131 Repeat Count Type 87
symbols truncation 148 Repeat Count Value Of 87
DATETIME formatting type member properties 141 Skip Count 87
CWF BINARY 256 type properties 138 BOOLEAN
CWF TimeMilliseconds 256 type properties, defaults 260 Byte Alignment 88
CWF Timeseconds 256 using mnemonics 135 Physical Type 88
STRING 253 video customer example 154 Repeat Count 88
X12 153 Repeat Count Type 88
TDS delimiter value Repeat Count Value Of 88
T Delimiter 134 Skip Count 88
Tagged/Delimited String Wire Format Group Indicator 134 compound element
layer 131 Group Terminator 134 Byte Alignment 105
TDS Repeating Element Delimiter 134 Length Count 105
ACORD AL3 150 Tag Data Separator 134 Length Units 105
BINARY element properties 143 TDS wire format Repeat Count 105
BOOLEAN element properties 143 adding 161 Repeat Count Type 105
combination of element type and data conversion 146 Repeat Count Value Of 105
property 144 support in MRM 4 Skip Count 105
data element separation use in MRM 29 DATETIME
All Elements Delimited 133 terms used in this book xii Byte Alignment 90
definition 132 transaction Encoding Null 92
Fixed Length 134 adding to the workspace 175 Encoding Null Value 92
Fixed Length AL3 134 characteristics 58 Format String 91
Tagged Delimited 133 defining 59 Length Count 89
Tagged Fixed Length 133 properties 59 Length Type 89
Undefined 134 property panes 58 Length Units 90
Variable Elements Delimited 133 transaction property Length Value Of 89
Data Element Separation rules 146 Identifier 59 Padding Character 91
DATETIME element properties 143 Name 59 Physical Type 89
DECIMAL element properties 143 Suspended from Use 59 Repeat Count 91
Decimal Point 135 tree Repeat Count Type 91
delimiter 131 child 12 Repeat Count Value Of 91
delimiter values 134 environment 14 Sign Orientation 90
EDIFACT 151 exception list 16 Signed 90
element properties 141 local environment 14 Skip Count 91
Escape Character 135 message 12 String Justification 90
examples of using special parent 12 DECIMAL
characters 135 sibling 12 Byte Alignment 94
FLOAT element properties 143 type Encoding Null 95
general rules 147 characteristics 49 Encoding Null Value 95
group indicator 131 properties 50 Length Count 93
group terminator 131 property panes 50 Length Units 93
identifying embedded message 145 Type Composition Padding Character 94
identifying multipart message 145 Choice 52, 108 Physical Type 93
industry standards 150 Empty 52, 108, 124 Repeat Count 94
INTEGER element properties 143 Message 52, 108 Repeat Count Type 94
message properties 138 Ordered Set 52, 108 Repeat Count Value Of 95
message set properties 136 permitted values for TDS 149 Sign Orientation 93
message set properties, defaults 259 Sequence 52, 107, 124 Signed 93
mnemonics 135 Simple Unordered Set 52, 108, 124 Skip Count 94
multipart message 145 Unordered Set 52, 108 String Justification 94
Index 285
XML wire format (continued)
encoding null
NULLAttribute 120
NULLElement 120
NULLEmpty 120
NULLValAttr 120
NULLValue 120
general rules 122
identifying multipart message in input
message 121
identifying multipart message in input
node 121
identifying multipart message in
MQRFH2 121
inline DTD 114
message properties 115
message set properties 112
MRM support for self-defining
elements 111
multipart message 121
null handling 119
null value options 120
relationship with logical model 123
rendering for output messages 119
rendering options 118, 119
rules 122
setting properties 112
storing a null value 120
support in MRM 4
use in MRM 29
use of Message Type Prefix 121
video customer example 126
Z
z/OS xii
Feel free to comment on what you regard as specific errors or omissions, and on
the accuracy, organization, subject matter, or completeness of this book.
Please limit your comments to the information in this book and the way in which
the information is presented.
To make comments about the functions of IBM products or systems, talk to your
IBM representative or to your IBM authorized remarketer.
When you send comments to IBM, you grant IBM a nonexclusive right to use or
distribute your comments in any way it believes appropriate, without incurring
any obligation to you.
You can send your comments to IBM in any of the following ways:
v By mail, to this address:
User Technologies Department (MP095)
IBM United Kingdom Laboratories
Hursley Park
WINCHESTER,
Hampshire
SO21 2JN
United Kingdom
v By fax:
– From outside the U.K., after your international access code use
44–1962–842327
– From within the U.K., use 01962–842327
v Electronically, use the appropriate network ID:
– IBM Mail Exchange: GBIBM2Q9 at IBMMAIL
– IBMLink: HURSLEY(IDRCF)
– Internet: [email protected]
Printed in U.S.A.
SC34-6039-01
Spine information:
WebSphere MQ Integrator WebSphere MQ Integrator Working with Messages Version 2.1