MRM Custom Wire Format

Custom Wire Format (CWF) is the physical representation of a message that is composed of a number of fixed-format data structures or elements, which are not separated by delimiters.

Tip: In Version 8, when modeling and parsing general text or binary data use message model schema with the DFDL domain, instead of message sets and the MRM domain.

Within a CWF messaging environment, it is not possible to distinguish one element from the next without knowledge of the message structure. To correctly determine the values of individual elements, the following information must be made available to the message parser:

  • The order (this is defined in the logical properties)
  • The length (can be specified in bytes, characters, or character units)
  • The cardinality (that is, the number of repeats)
  • The type of data contained in each element (this is partly defined in the logical properties but can be further qualified in the CWF physical format)
  • A number of characteristics based upon the logical type of the data

A CWF physical format is typically used to describe messages which are mapped to a C structure, a COBOL copybook, or other programming language data structure definition.

You can add more than one CWF physical format to a message set, but within that message set, each physical format must have a unique name. When parsing a CWF message by using the MRM parser, the physical format name specifies the physical properties that are to be used by the parser.

Adding a CWF physical format to a message set enables you to process input messages and construct output messages in this format. Messages can be transformed between CWF and the other physical representations (for example TDS or XML). While the other physical representations support self-defining elements (that is elements which do not have a definition in the logical model) within the MRM domain, the parsing of a CWF message does not. Consequently, any such self-defining elements are discarded during the output of messages in CWF format.