All programs will return at least a status and message. The status is a string value or an i5/OS API reason code, such as:

  • OK

  • ERROR

  • FATAL

  • NOMSG

  • CPF9801 - Object not found

         and so on...

JSMDQGET - Get message

Parameter

Description

I/O

Type

Len

Dec

JSMQLIB

Library

I

CHAR

10


JSMQNME

Queue

I

CHAR

10


JSMQKEY

Key - Use a blank key value for a non-keyed data queue.

I

CHAR

256


JSMWAIT

Wait time (millisecs, rounded to nearest second)

I

DEC

8

0

JSMSTS

Status

O

CHAR

20


JSMMSG

Message

O

CHAR

256


Example

    CHANGE FIELD(#JSMQLIB) TO(MYLIB)
CHANGE FIELD(#JSMQNME) TO(MYQUEUE)
CHANGE FIELD(#JSMQKEY) TO(*BLANK)

CALL PGM(JSMDQGET) PARM(#JSMQLIB #JSMQNME #JSMQKEY #JSMWAIT #JSMSTS #JSMMSG) NUM_LEN(*DEFINED)

JSMDQPUT - Put message

Parameter

Description

I/O

Type

Len

Dec

JSMQLIB

Library

I

CHAR

10


JSMQNME

Queue

I

CHAR

10


JSMQKEY

Key - Use a blank key value for a non-keyed data queue.

I

CHAR

256


JSMSTS

Status

O

CHAR

20


JSMMSG

Message

O

CHAR

256


Example

    CALL PGM(JSMDQPUT) PARM(#JSMQLIB #JSMQNME #JSMQKEY #JSMSTS #JSMMSG)


  • No labels