MSGREAD gets RC4 in REXX exec

Technote (FAQ)


Question

Trapping for a MLWTO and then waiting for the complete response, my CLIST worked before maintenance but now fails with a RC(4). Is the maintenance in error?

Answer

The following is the REXX source..

/* REXX */
'MVS D J,MYJOB'
'TRAP DISPLAY MESSAGES IEE115I'
'WAIT 30 SECONDS FOR MESSAGES'
'MSGREAD'
'GETMSIZE 'N
.....etc....
In this case the command 'MVS D J,MYJOB' which was to generate the IEE115I message came prior to the trap for the IEE115I. Because the command and wait will take different threads this may work if the message happens to be returned after the trap sets up. Maintenance could change this timing however causing the IEE115I to return before the trap sets up. The problem isn't the maintenance in either case but rather the order that the command and trap are put into the command list. It is important that any command that generates a message being trapped in a CLIST be entered after the trap is set up. For example in this case
/* REXX */
'TRAP NO MESSAGES'
'FLUSHQ'
'TRAP DISPLAY MESSAGES IEE115I'
MVS D J,MYJOB'
'WAIT 30 SECONDS FOR MESSAGES'
'MSGREAD'
'GETMSIZE 'N
.....etc....
(The 'trap no messages' and 'flushq' are optional but a good idea generally. This is especially the case if there are, or may be, other message traps active at the same time.)


Product Alias/Synonym

NetView

Rate this page:

(0 users)Average rating

Document information


More support for:

Tivoli NetView for z/OS

Software version:

5.3

Operating system(s):

z/OS

Reference #:

1272197

Modified date:

2013-05-10

Translate my page

Machine Translation

Content navigation