WebSphere Message Brokers
File: ad15150_
Writer: Terry Cowling

Reference topic

This build: July 31, 2007 21:24:41

CWF properties for attribute reference and local attribute dateTime types

The Custom Wire Format properties described here apply to:

Physical representation

Property Type Meaning
Physical Type Enumerated type Select one of the following from the drop-down list:
  • Fixed Length String. The element's length is determined by other length properties below.
  • Length Encoded String 1. The element's first byte contains the length of the string following the length byte in length units. The maximum length of a Length Encoded String 1 element is 255 length units.
  • Length Encoded String 2. The element's first two bytes contain the length of the string following the 2 length bytes in length units. The maximum length of a Length Encoded String 2 element is 65535 length units. The two length bytes are in the format of the WebSphere MQ queue manager Encoding.
  • Null Terminated String. The string ends with the hexadecimal NULL character, X'00'.
  • Packed Decimal. The dateTime is coded as a Packed Decimal number. It is valid only if the DateTime Format property represents numeric-only data.
  • Binary. The dateTime is encoded as a binary sequence of bytes. If you select this option, the range of symbols that you can specify for the Format String property is less than the range of symbols you can specify if you select a string option (see DateTime formats for details).
  • Time Seconds. This value supports C time_t and Java Date and Time objects. It is valid only if the DateTime Format property represents numeric-only data.
  • Time Milliseconds. This value supports C time_t and Java Date and Time objects. It is valid only if the DateTime Format property represents numeric-only data.

The default value is fixed length string.

DateTime Format String Specify a template for date and time.

The default dateTime format is dependent on the logical type of the object. For information on the defaults for the dateTime format according to the logical type see DateTime defaults by logical type.

If you set the Physical Type to Binary, the template is restricted to those components defined in DateTime as string data . If you set the Physical Type to Packed Decimal, Time Seconds, or Time Milliseconds, the template is restricted to those components that represent numbers. In these cases, you must update this DateTime Format property.

See DateTime formats for details of date and time formats.

Length Count Button and Integer If you have selected a Physical Type of Fixed Length String, Packed Decimal, or Binary, and have set Length Type to Count, enter the number of length units for the element.

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.

The default value is 0 (zero).

Length Reference Button and Enumerated type If you have selected the length to be defined by Length Reference, select the name of the Integer object that specifies the length of this object. Make your selection from the drop-down list of Integer objects that are defined as siblings of the current object, and occur before it in the structure of the message.

For information about reordering elements, see Reordering objects.

Length Units Enumerated type Select the unit of length for the element or attribute. Select one of the following options from the drop-down list (some physical types do not offer all of these options):
  • Bytes. The length is given in bytes.
  • Characters. The Length is given in characters. This means that the number of bytes that are processed in the bitstream depends on the code page of the characters that are being processed.
    • For a single-byte code page (SBCS CCSID) such as "latin-1" (CCSID 850), the number of bytes is equal to the number of characters.
    • For a double-byte code page (DBCS CCSID) such as "UTF-16" (CCSID 1200), the number of bytes is exactly twice the number of characters.
    • For a multibyte code page (MBCS CCSID) such as "UTF-8" (CCSID 1208), the number of bytes depends on the bitstream content. The parser reads one character at a time and determines whether the character comprises one or more bytes.
  • Character Units. This specifies that the size of each character (in bytes) is determined by the code page of the message.
    • For single-byte and double-byte code pages, this option is identical to Characters.
    • For a multibyte code page, this option provides improved parsing performance by assuming that every character is encoded in the smallest character unit that the code page supports. However, this means that a message must contain only these characters if it is to be processed correctly. For example, in code page "UTF-8" (CCSID 1208), the minimum character unit is one byte; therefore, the parser can make a single read (of the number of bytes specified by the Length property) to fetch the entire message. The message must contain only characters that are encoded in 1-byte units.
  • End of Bitstream. All data up to the end of the bitstream is processed. This option is valid only if the element is the last in the message. If you select this value, you do not need to enter a value for the Length Count or Length Reference property.

The default is bytes.

Signed Boolean If you have set the Physical Type property to Packed Decimal, Time Seconds, or Time Milliseconds, select (the default) or unselect Signed. If you have selected another value for Physical Type, this property is invalid.
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 property is inactive.
Padding Character String

If you have set the Physical Type property to Fixed Length String, and the String Justification property is either Left Justify or Right Justify, this property is applicable.

When writing an output message, use the padding character to fill out the remaining character positions when the string length is less than the length implied by the Length Count or Length Reference property. Whether the string is padded from the left or the right is governed by the String Justification property.

When parsing an input message, the padding character is trimmed from the end of the string. Whether the string is trimmed from the left or the right is governed by the String Justification property.

Specify this character in one of the following ways:

  • Select NUL, '0', or SPACE from the drop-down list.
  • Enter a character between quotes; for example, "c" or 'c', where c is any alphanumeric character.
  • Enter a Unicode value in the form U+xxxx where xxxx is a Unicode value specified in hexadecimal. The maximum length of the string that you can enter is 10.
  • Enter a hexadecimal character in the form 0xYY, where YY is a hexadecimal value.
  • Enter a decimal byte value (from 0 to 255).

The choice of which of these padding character forms is used for an MRM element depends on the padding character that is required and whether the padding character is to be subject to data conversion. In most cases, the specification of a padding character in quotes is sufficient, and when this padding character is used, it is converted to the target code page of the output MRM message that is being generated. For example, when converting from ASCII to the code page 500, if you have specified U+0008 as your padding character, this is converted from 0x08 to 0x15, the ASCII and EBCDIC representations of 'back space'.

If a padding character is required that cannot easily be entered in the padding character field, the Unicode mnemonic format can be used to specify the required character. When used, this Unicode value is also converted to the target code page of the MRM message that is being generated.

If you are converting a message from one code page to another, you should ensure that the converted value of the padding character is valid for this code page. If the padding character cannot be represented in the target code page, it is replaced by a substitution character. The substitution character is fixed and its value depends on the specified target code page.

If a padding character is required that is not subject to data conversion, the hexadecimal or decimal format can be used. This gives the option of specifying an absolute value as a padding character that is inserted directly into the output message. If this format is used, you should still aim to ensure that this value is valid for the code page of any output messages that are created using these MRM definitions.

Byte alignment

Property Type Meaning
Byte Alignment Enumerated type Specify how the object is aligned from the start of the message. Select one of:
  • 1 Bytes. This is the default value.
  • 2 Bytes
  • 4 Bytes
  • 8 Bytes
  • 16 Bytes
Leading Skip Count Integer Specify the number of bytes to skip before reading or writing this object. The default is 0, the minimum value is 0, and the maximum value is 999999. You can use this value to ignore unwanted fields in a structure, or to model a field defined by C or COBOL data which requires alignment on a 2, 4, 8 or 16 byte boundary. Specify the number of bytes to skip before reading or writing this object. When an output message is written, Skip Count bytes are assigned the value of the message set Byte Alignment Pad property.

For repeating objects, this property is applied to the first instance only.

Trailing Skip Count Integer Specify the number of bytes to skip after reading or writing this object. The default is 0, the minimum value is 0, and the maximum value is 999999. You can use this value to ignore unwanted fields in a structure, or to model a repeating structure containing fields which require alignment on a 2, 4, 8 or 16 byte boundary. When an output message is written, Skip Count bytes are assigned the value of the message set Byte Alignment Pad property.

For repeating objects, this property is applied to all instances.

Related concepts
Message modeling
The message model
Custom wire format: relationship to the logical model
Related tasks
Developing message models
Working with message model objects
Related reference
Message model reference information
Message model object properties
Logical properties for message model objects
Custom Wire Format physical properties for message model objects
XML wire format physical properties for message model objects
TDS format physical properties for message model objects
Documentation properties for all message set objects
Message model object properties by object
Additional MRM domain information
Notices | Trademarks | Downloads | Library | Support | Feedback

Copyright IBM Corporation 1999, 2007Copyright IBM Corporation 1999, 2007. All Rights Reserved.
This build: July 31, 2007 21:24:41

ad15150_ This topic's URL is: