9.121 ISSUEMESSAGE

Note: Built-In Function Rules     Usage Options

Issues a message to a message queue.

Arguments

No

Type

Req/ Opt

Description

Min Len

Max Len

Min Dec

Max Dec

1

A

Req

Message queue to which message is to be sent. Do not leave this argument blank.
Note: This argument is ignored on non-IBM i platforms.

1

10

 

 

2

A

Req

Type of message (T = text, M = from message file)

1

1

 

 

3

A

Req

Text of message (T) or message number (M)

1

132

 

 

4

A

Opt

Message file name (M only)

Default: QUSRMSG

1

10

 

 

5

A

Opt

Message file library (M only)

Default: *LIBL

1

10

 

 

6

A

Opt

Message data Default: *BLANKS

1

132

 

 

 

Return Values

No return values.

Examples

Issue a message to ask user to sign off for 10 minutes:

USE        BUILTIN(ISSUEMESSAGE)

           WITH_ARGS(DSP16 T 

          'Please sign off for 10 minutes. Thank you.'

Issue a message to tell operator that DAYJOB to CLOSE has been submitted to the batch queue:

CHANGE     FIELD(#MSGID) TO(MSG0121)

CHANGE     FIELD(#MSGF) TO(WRKMSGF)

CHANGE     FIELD(#SUB) TO('''DAILY    CLOSE''')

*

SUBMIT     PROCESS(DAYLY) FUNCTION(CLOSE)

USE        BUILTIN(ISSUEMESSAGE) WITH_ARGS(DSP01 M #MSGID

           #MSGF #SUB)

*

MSG0121 = The &1 &2 job for today has been submitted.

Note: The message data parameter corresponds directly to the MSGDTA parameter in the CL command SNDPGMMSG. The passing of information through this parameter is your responsibility. For more information on passing substitution variables see the appropriate IBM manuals.