IBM AS/400 Frozen Dessert Maker User Manual


 
If you encounter this problem, you have two possible ways to avoid it:
1. Ensure that the caller is in a different activation group from the ILE RPG proce-
dure.
2. Enable an ILE condition handler in the RPG procedure. In the handler, if the
message is one that you want to ignore, indicate that the message should be
handled. Otherwise, indicate that it should be percolated.
You could also make this handler more generic, and have it ignore all mes-
sages with a severity of 0 (information) and 1 (warning).
Figure 120 shows an example of a ILE condition handler that ignores
CPF4906.
*----------------------------------------------------------------
* Handler definitions
*----------------------------------------------------------------
D Action S 10I 0
D Token DS
D MsgSev 5I 0
D MsgNo 2A
D 1A
D Prefix 3A
D 4A
*----------------------------------------------------------------
* Actions
*----------------------------------------------------------------
D Handle C 10
D Percolate C 20
*----------------------------------------------------------------
* Severities
*----------------------------------------------------------------
D Info C 0
D Warning C 1
D Error C 2
D Severe C 3
D Critical C 4
C *ENTRY PLIST
C PARM Token
C PARM dummy 1
C PARM Action
*----------------------------------------------------------------
* If this is CPF4906, handle the notify msg, otherwise percolate
*----------------------------------------------------------------
C IF Prefix = 'CPF' AND
C MsgNo = X'4906'
C EVAL Action = Handle
C ELSE
C EVAL Action = Percolate
C ENDIF
C RETURN
Figure 120. ILE Condition Handler that Ignores CPF4906
Figure 121 on page 249 shows how you would code the calculations if you
wanted to ignore all status and notify messages. Escape messages and func-
tion checks have a severity of 2 (Error) or higher.
248 ILE RPG for AS/400 Programmer's Guide