StrucLength field, Parameter field, CodedCharSetId field, StringLength field" /> MQCFST - String parameter

 

MQCFST - String parameter

The MQCFST structure describes a string parameter.

The structure ends with a variable-length character string; see the String field below for further details.

Type

Description: Indicates that the structure type is MQCFST and describes a string parameter.
Datatype: MQLONG.
Value:

MQCFT_STRING

Structure defining a string.

StrucLength

Description: Length in bytes of the MQCFST structure, including the string at the end of the structure (the String field).
Datatype: MQLONG.

Parameter

Description: Identifies the parameter whose value is contained in the structure.
Datatype: MQLONG.
Values: Dependent on the event message.

CodedCharSetId

Description: Coded character set identifier of the data in the String field.
Datatype: MQLONG.

StringLength

Description: Length in bytes of the data in the String field; zero or greater.
Datatype: MQLONG.

String

Description: The value of the parameter identified by the Parameter field.

In MQFMT_EVENT messages, trailing blanks can be omitted from string parameters (that is, the string may be shorter than the defined length of the parameter). StringLength gives the length of the string actually present in the message.

Datatype: MQCHAR×StringLength.
Value: The string can contain any characters that are in the character set defined by CodedCharSetId, and that are valid for the parameter identified by Parameter.
Language
considerations:
The way that this field is declared depends on the programming language:

  • For the C programming language, the field is declared as an array with one element. Storage for the structure should be allocated dynamically, and pointers used to address the fields within it.

  • For the COBOL, PL/I, System/390 assembler, and Visual Basic programming languages, the field is omitted from the structure declaration. When an instance of the structure is declared, the user should include MQCFST in a larger structure, and declare additional fields following MQCFST, to represent the String field as required.

A null character in the string is treated as normal data, and does not act as a delimiter for the string. This means that when a receiving application reads an MQFMT_EVENT message, the receiving application receives all of the data specified by the sending application. The data may, of course, have been converted between character sets (for example, by the receiving application specifying the MQGMO_CONVERT option on the MQGET call).