sizespec

Description

(MQ only) Message options and property values that accept a size accept the following syntax as a size specification.

Syntax

sizespec ::= integer_number [ sizespec_units ]
	sizespec_units ::= { M | K }

Parameters

integer_number

is the size.

K or k

is kilobytes.

M or m

is megabytes.

sizespec_units

is the size specification in megabytes (M) or kilobytes (K), or bytes.

If you do not provide sizespec_units, the default is bytes.

Examples

Example 1

Shows the size specification for 100MB:

-- Specify buffer length to be 100 megabytes
select msgrecv('ibm_mq:channel1/tcp/host1(5678)?'
    + 'qmgr=QM1,queue=SYSTEM.DEFAULT.LOCAL.QUEUE'
    option 'bufferLength=100M')

Example 2

Shows the size specification for 300K:

-- Specify buffer length to be 300 kilobytes
select msgrecv(
    'ibm_mq:channel2/tcp/host2(5678)?qmgr=QM2,remote_qmgr=QM3,queue=QM3.Q'
    option 'bufferLength=300K')

Example 3

(MQ) shows the size specification for 1MB:

-- bufferLength specified as 1 megabyte
select msgrecv(
       'ibm_mq:channel1/tcp/host1(5678)?qmgr=QM1,queue=DEFAULT.QUEUE'
       option 'bufferLength=1M')

Example 4

(MQ) shows the size specification for 10K:

-- bufferLength specified as 10K
select msgrecv(
       'ibm_mq:channel1/tcp/host1(5678)?qmgr=QM1,queue=DEFAULT.QUEUE'
       option 'bufferLength=10K')