CWF properties for embedded simple type integer 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:
  • Integer. This equates to the data type SHORT or LONG in C, or the COMP, COMP-4, COMP-5, or BINARY numeric data type in COBOL.
  • Packed Decimal. This equates to the COMP-3 data type in COBOL.
  • External Decimal. This equates to the data type PIC 9 USAGE DISPLAY in COBOL.

The representation of numeric elements can be affected by the Encoding and CodedCharSetId attributes that are set for the WebSphere MQ queue manager:

  • Elements that have Physical Type set to Integer and Packed Decimal are represented in the appropriate WebSphere MQ Encoding value.
  • Elements that have Physical Type set to External Decimal are represented in the WebSphere MQ CodedCharSetId value.
Length Count Integer Enter the number of bytes to specify the element length:
  • If you set the Physical Type to Integer, select 1, 2, or 4 (the default) from the drop-down list.
  • If you have set Physical Type to Packed Decimal, enter a value between 1 and 6.
  • If you have set Physical Type to Extended Decimal, enter a value between 1 and 11.
Length Units Enumerated type Subject to the Physical Type that has been set, select one of the following from the drop-down list:
  • Bytes.
  • Characters. The meaning of this option depends on the value that you have set in the message's CCSID or that you have set for the message set property Default CCSID.
    • If you have specified an SBCS CCSID, X bytes are processed where X is the value of Length Count or of the INTEGER specified by Length Reference.
    • If you have specified a DBCS CCSID, Y bytes are processed, where Y is the value of Length Count or of the INTEGER specified in Length Reference multiplied by two.
    • If you have specified an MBCS CCSID, the parser reads 1 character at a time and determines whether the character comprises 1 or more bytes. The parser performs Z reads, where Z is the value of Length Count or of the INTEGER specified in Length Reference.
  • Character Units. This specifies that the size of character unit is determined by the value that you have set in the message's CCSID, or for the message set property Default CCSID. The number of bytes processed is the size of character unit multiplied by the value of Length Count, or of the INTEGER specified in Length Reference.
  • End of Bitstream. All data until end of bit stream 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 in Length Count.

The default is bytes.

Signed Boolean Select (the default) or deselect this property. This property is used in conjunction with Sign Orientation.
Sign EBCDIC Custom Boolean If the Physical Type is set to External Decimal and the Signed EBCDIC Custom property is set, this indicates that the Sign EBCDIC Custom representation is to be used within an ASCII environment. If this check box is not set (the default), the Sign ASCII representation is used.

The setting of the Sign EBCDIC Custom check box is only appropriate if the Sign Orientation property is set to Leading or Trailing (indicating that the element/attribute has an embedded sign representation).

The check box is disabled if the element/attribute is unsigned (for example, where the Signed check box is not set).

Sign Orientation Enumerated type If you have set Physical Type to External Decimal and you have selected Signed, choose from the following options that represent the COBOL options for displaying numeric data:
  • Included Leading. This sets a bit in the first byte on if the number is negative. No setting is made if the number is positive. For example, the ASCII hexadecimal representation of the number 22 is x'3232'. Using this option, the number +22 would be x'3232' and the number -22 would be x'7232'. This is the default value.
  • Separate Leading. This sets the first byte of the element to '+' if the number is positive and to '-' if the number is negative. For this option, the length must include the sign byte.
  • Included Trailing. This sets a bit in the last byte on if the number is negative. No setting is made if the number is positive. Using this option, the number +22 would be x'3232' and the number -22 would be x'3272'.
  • Separate Trailing. This sets the last byte of the element to '+' if the number is positive and to '-' if the number is negative. For this option, the length must include the sign byte.
If you have set Physical Type to any other value, the value Not Applicable is set for you.
String Justification Enumerated type If you have set the Physical Type property to External 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 property is inactive.
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 the Physical Type property to Extended Decimal, and the String Justification property is either Left Justify or Right Justify, 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.

Representation of null values

Property Type Meaning
Encoding Null Enumerated type Select one of the following options from the drop-down list:
  • NULLPadFill. This is only valid if Physical Type is External Decimal. The field is filled with the value specified by the Padding Character. Encoding Null Value must be set to an empty string.
  • NULLLogicalValue. The Encoding Null Value is transformed to match the required format for the field. This is the default value.
  • NULLLiteralValue. The Encoding Null Value is directly substituted as if it is a string. You can specify a nonnumeric value for Encoding Null Value.
  • NULLLiteralFill. The field is filled with the value specified by the Encoding Null Value. Encoding Null Value must resolve to a single character.
Encoding Null Value String The use of this property depends on the Encoding Null property, described above, with the exception of NULLLiteralFill. The default value is zero.
If you set the Encoding Null property to NULLLiteralFill, the value must resolve to a single character. Set the character in one of the following ways:
  • Select SPACE, NUL, 0x00 or 0xFF from the drop-down list
  • Enter a character between quotation marks, for example 'c' or "c", where c is any alphanumeric character.
  • Enter a hexadecimal character in the form 0xYY where YY is a hexadecimal value.
  • Enter a decimal character code in the form YY where YY is a decimal value.
  • Enter a Unicode value in the form U+xxxx where xxxx is a Unicode value specified in hexadecimal format.

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.

Repeat

Property Type Meaning
Repeat Reference Enumerated type Use this property if the object occurs multiple times, and the number of occurrences is given dynamically by a field earlier in the message.

Select an integer object from the drop-down list of integer objects that occur before this object in the structure of the message. The value of the selected integer specifies the number of occurrences of this object. If no objects are listed, there are no integer objects prior to this one in the message structure.

If a Repeat Reference is specified, it overrides any setting for the Max Occurs logical property when parsing and writing the message, but not for validation of the message.

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
Deprecated message model object properties
Embedded simple type properties
Embedded simple type CWF properties