Elementary data types on IBM i
All of the other data types described in this section equate either directly to these elementary data types, or to aggregates of these elementary data types (arrays or structures).
| Elementary data type | Data type | Description |
|---|---|---|
| MQBOOL | 10-digit signed integer | The MQBOOL data type represents a boolean value. The value 0 represents false. Any other value represents true. An MQBOOL must be aligned as for the MQLONG data type. |
| MQBYTE | 1-byte alphanumeric field | The MQBYTE data type represents a single byte of data. No particular
interpretation is placed on the byte. It is treated as a string of bits, and not as a binary number
or character. No special alignment is required. An array of MQBYTE is sometimes used to represent an area of main storage with a nature that is not known to the queue manager. For example, the area might contain application message data or a structure. The boundary alignment of this area must be compatible with the nature of the data contained within it. |
| MQBYTE16 | 16-byte alphanumeric field | Each MQBYTEn data type represents a
string of n bytes where n can take one of the following
values: 16, 24, 32, or 64. Each byte is described by the MQBYTE data type. No special alignment is required. If the data in the string is shorter than the defined length of the string, the data must be padded with nulls to fill the string. When the queue manager returns byte strings to the application (for example, on the MQGET call), the queue manager always pads with nulls to the defined length of the string. Constants are available that define the lengths of byte string fields. |
| MQBYTE24 | 24-byte alphanumeric field | |
| MQBYTE32 | 32-byte alphanumeric field | |
| MQBYTE64 | 64-byte alphanumeric field | |
| MQCHAR | 1-byte alphanumeric field | The MQCHAR data type represents a single character. The coded character set identifier of the character is that of the queue manager (see the CodedCharSetId attribute in topic CodedCharSetId ). No special alignment is required. Note: Application message data
specified on the MQGET, MQPUT, and MQPUT1 calls is described by the MQBYTE data type, not the MQCHAR data type.
|
| MQCHAR4 | 4-byte alphanumeric field | Each MQCHARn data type represents a
string of n characters where n can take one of the following
values: 4, 8, 12, 16, 20, 28, 32, 48, 64, 128, or 256. Each character is described by the MQCHAR data type. No special alignment is required. If the data in the string is shorter than the defined length of the string, the data must be padded with blanks to fill the string. In some cases a null character can be used to end the string prematurely, instead of padding with blanks; the null character and characters following it are treated as blanks, up to the defined length of the string. The places where a null can be used are identified in the call and data type descriptions. When the queue manager returns character strings to the application (for example, on the MQGET call), the queue manager always pads with blanks to the defined length of the string; the queue manager does not use the null character to delimit the string. Constants are available that define the lengths of character string fields. |
| MQCHAR8 | 8-byte alphanumeric field | |
| MQCHAR12 | 12-byte alphanumeric field | |
| MQCHAR16 | 16-byte alphanumeric field | |
| MQCHAR20 | 20-byte alphanumeric field | |
| MQCHAR28 | 28-byte alphanumeric field | |
| MQCHAR32 | 32-byte alphanumeric field | |
| MQCHAR48 | 48-byte alphanumeric field | |
| MQCHAR64 | 64-byte alphanumeric field | |
| MQCHAR128 | 128-byte alphanumeric field | |
| MQCHAR256 | 256-byte alphanumeric field | |
| MQFLOAT32 | 4-byte floating-point number | The MQFLOAT32 data type is a 32-bit floating-point number represented using the standard IEEE floating-point format. An MQFLOAT32 must be aligned on a 4-byte boundary. |
| MQFLOAT64 | 8-byte floating-point number | The MQFLOAT64 data type is a 64-bit floating-point number represented using the standard IEEE floating-point format. An MQFLOAT64 must be aligned on an 8-byte boundary. |
| MQHCONFIG | Configuration handle | The MQHCONFIG data type represents a configuration handle, that is, the
component that is being configured for a particular installable service. A configuration handle must
be aligned on its natural boundary. Note: Applications must test variables of this type for equality
only.
|
| MQHCONN | 10-digit signed integer | The MQHCONN data type represents a connection handle, that is, the
connection to a particular queue manager. A connection handle must be aligned on its natural
boundary. Note: Applications must test variables of this type for equality only.
|
| MQHMSG | Message handle | The MQHMSG data type represents a message handle that gives access to a
message. A message handle must be aligned on an 8-byte boundary. Note: Applications must test
variables of this type for equality only.
|
| MQHOBJ | 10-digit signed integer | The MQHOBJ data type represents an object handle that gives access to an
object. An object handle must be aligned on its natural boundary. Note: Applications must test
variables of this type for equality only.
|
| MQINT8 | 8-bit signed integer | The MQINT8 data type is an 8-bit signed integer that can take any value in the range -128 to +127, unless otherwise restricted by the context. |
| MQINT16 | 16-bit signed integer | The MQINT16 data type is a 16-bit signed integer that can take any value in the range -32 768 to +32 767, unless otherwise restricted by the context. An MQINT16 must be aligned on a 2-byte boundary. |
| MQINT32 | 32-bit signed integer | The MQINT32 data type is a 32-bit signed integer. It is equivalent to MQLONG. |
| MQINT64 | 64-bit signed integer | The MQINT64 data type is a 64-bit signed integer that can take any value
in the range -9 223 372 036 854 775 808 through +9 223 372 036 854 775 807, unless otherwise
restricted by the context. For COBOL, the valid range is limited to -999 999 999 999 999 999 through +999 999 999 999 999 999. An MQINT64 should be aligned on an 8-byte boundary. |
| MQLONG | 32-bit signed integer | The MQLONG data type is a 32-bit signed binary integer that can take any value in the range -2 147 483 648 through +2 147 483 647, unless otherwise restricted by the context, aligned on its natural boundary. |
| MQPID | Process identifier | The IBM® MQ process identifier. This is the same identifier used in IBM MQ trace and FFST dumps, but might be different from the operating system process identifier. |
| MQPTR | Pointer | The MQPTR data type is the address of data of any type. A pointer must be
aligned on its natural boundary; this is a 16-byte boundary on IBM i. Some programming languages support typed pointers; the MQI also uses these in a few cases. |
| MQTID | Thread identifier | The IBM MQ thread identifier. This is the same identifier used in IBM MQ trace and FFST dumps, but might be different from the operating system thread identifier. |
| MQUINT8 | 8-bit unsigned integer | The MQUINT8 data type is an 8-bit unsigned integer that can take any value in the range 0 to +255, unless otherwise restricted by the context. |
| MQUINT16 | 16-bit unsigned integer | The MQUINT16 data type is a 16-bit unsigned integer that can take any value in the range 0 through +65 535, unless otherwise restricted by the context. An MQUINT16 must be aligned on a 2-byte boundary. |
| MQUINT32 | 32-bit unsigned integer | The MQUINT32 data type is a 32-bit unsigned integer. It is equivalent to MQULONG. |
| MQUINT64 | 64-bit unsigned integer | The MQUINT64 data type is a 64-bit unsigned integer that can take any
value in the range 0 through +18 446 744 073 709 551 615 unless otherwise restricted by the context.
For COBOL, the valid range is limited to 0 through +999 999 999 999 999 999. An MQUINT64 should be aligned on a 8-byte boundary. |
| MQULONG | 32-bit unsigned integer | The MQULONG data type is a 32-bit unsigned binary integer that can take
any value in the range 0 through +4 294 967 294, unless otherwise restricted by the
context. An MQULONG must be aligned on a 4-byte boundary. |
| PMQACH | Pointer | A pointer to a data structure of type MQACH. |
| PMQAIR | Pointer | A pointer to a data structure of type MQAIR. |
| PMQAXC | Pointer | A pointer to a data structure of type MQAXC. |
| PMAXP | Pointer | A pointer to a data structure of type MQAXP. |
| PMQBMHO | Pointer | A pointer to a data structure of type MQBMHO. |
| PMQBO | Pointer | A pointer to a data structure of type MQBO. |
| PMQBOOL | Pointer | A pointer to data of type MQBOOL. |
| PMQBYTE | Pointer | A pointer to a data type of MQBYTE. |
| PMQBYTEn | Pointer | A pointer to a data structure of type MQBYTEn, where n can be 8, 12, 16, 24, 32, 40, 48 or 128. |
| PMQCBC | Pointer | A pointer to a data structure of type MQCBC. |
| PMQCBD | Pointer | A pointer to a data structure of type MQCBD. |
| PMQCHAR | Pointer | A pointer to data of type MQCHAR. |
| PMQCHARV | Pointer to a data structure of type MQCHARV | A pointer to a data structure of type MQCHARV. |
| PMQCHARn | Pointer to data of type MQCHARn | A pointer to a data type of MQCHARn, where n can be 4, 8, 12, 20, 28, 32, 64, 128, 256, 264. |
| PMQCIH | Pointer | A pointer to a data structure of type of MQCIH. |
| PMQCMHO | Pointer | A pointer to a data structure of type MQCMHO. |
| PMQCNO | Pointer | A pointer to a data structure of type of MQCNO. |
| PMQCSP | Pointer | A pointer to a data structure of type MQCSP. |
| PMQCTLO | Pointer | A pointer to a data structure of type MQCTLO. |
| PMQDH | Pointer | A pointer to a data structure of type MQDH. |
| PMQDHO | Pointer | A pointer to a data structure of type MQDHO. |
| PMQDLH | Pointer | A pointer to a data structure of type of MQDLH. |
| PMQDMHO | Pointer | A pointer to a data structure of type MQDMHO. |
| PMQDMPO | Pointer | A pointer to a data structure of type MQDMPO. |
| PMQEPH | Pointer | A pointer to a data structure of type MQEPH. |
| PMQFLOAT32 | Pointer | A pointer to data of type MQFLOAT32. |
| PMQFLOAT64 | Pointer | A pointer to data of type MQFLOAT64. |
| PMQFUNC | Pointer | A pointer to a function. |
| PMQGMO | Pointer | A pointer to a data structure of type MQGMO. |
| PMQHCONFIG | Pointer | A pointer to a data type of MQHCONFIG. |
| PMQHCONN | Pointer | A pointer to a data type of MQHCONN. |
| PMQHMSG | Pointer | A pointer to a data type of MQHMSG. |
| PMQHOBJ | Pointer to data of type MQHOBJ | A pointer to data of type MQSMPO. |
| PMQIIH | Pointer | A pointer to a data structure of type MQIIH. |
| PMQIMPO | Pointer | A pointer to a data structure of type MQIMPO. |
| PMQINT8 | Pointer | A pointer to data of type MQINT8. |
| PMQINT16 | Pointer | A pointer to data of type MQINT16. |
| PMQINT32 | Pointer | The PMQINT32 data type is a pointer to data of type MQINT32. It is equivalent to PMQLONG. |
| PMQINT64 | Pointer | The PMQINT64 data type is a pointer to data of type MQINT64. |
| PMQLONG | Pointer | A pointer to data of type MQLONG. |
| PMQMD | Pointer | A pointer to structure of type MQMD. |
| PMQMDE | Pointer | A pointer to a data structure of type MQMDE. |
| PMQMD1 | Pointer | A pointer to a data structure of type MQMDI. |
| PMQMD2 | Pointer | A pointer to a data structure of type MQMD2. |
| PMQMHBO | Pointer | A pointer to a data structure of type MQMHBO. |
| PMQOD | Pointer | A pointer to a data structure of type MQOD. |
| PMQOR | Pointer | A pointer to a data structure of type MQOR. |
| PMQPD | Pointer | A pointer to a data structure of type MQPD. |
| PMQPID | Pointer | A pointer to a process identifier. |
| PMQPMO | Pointer | A pointer to a data structure of type MQPMO. |
| PMQPTR | Pointer | A pointer to data of type MQPTR. |
| PMQRFH | Pointer | A pointer to a data structure of type MQRFH. |
| PMQRFH2 | Pointer | A pointer to a data structure of type MQRFH2. |
| PMQRMH | Pointer | A pointer to a data structure of type MQRMH. |
| PMQRR | Pointer | A pointer to a data structure of type MQRR. |
| PMQSCO | Pointer | A pointer to a data structure of type MQSCO. |
| PMQSD | Pointer | A pointer to a data structure of type MQSD. |
| PMQSMPO | Pointer | A pointer to a data structure of type MQSMPO. |
| PMQSRO | Pointer | A pointer to a data structure of type MQSRO. |
| PMQSTS | Pointer | A pointer to a data structure of type MQSTS. |
| PMQTID | Pointer | A pointer to a data structure of type MQTID. |
| PMQTM | Pointer | A pointer to a data structure of type MQTM. |
| PMQTMC2 | Pointer | A pointer to a data structure of type MQTMC2. |
| PMQUINT8 | Pointer | A pointer to data of type MQUINT8. |
| PMQUINT16 | Pointer | A pointer to data of type MQUINT16. |
| PMQUINT32 | Pointer | The PMQUINT32 data type is a pointer to data of type MQUINT32. It is equivalent to PMQULONG. |
| PMQUINT64 | Pointer | The PMQUINT64 data type is a pointer to data of type MQUINT64. |
| PMQULONG | Pointer | A pointer to data of type MQULONG. |
| PMQVOID | Pointer | A pointer. |
| PMQWIH | Pointer | A pointer to a data structure of type MQWIH. |
| PMQXQH | Pointer | A pointer to a data structure of type MQXQH. |