IBM AS/400 Frozen Dessert Maker User Manual


 
ILE Condition Handlers
| D CondTok DS BASED(pCondTok)
| D MsgSev 5I 0
| D MsgNo 2A
| D 1A
| D MsgPrefix 3A
| D MsgKey 4A
| D CommArea DS BASED(pCommArea)
| D pPSDS *
| D AllowError 1N
| D PassedPSDS DS BASED(pPSDS)
| D ProcName 1 10
| *
| * Action codes are:
| *
| D Resume C 10
| D Percolate C 20
| *-----------------------------------------------------------------*
| * Point to the input condition token *
| *-----------------------------------------------------------------*
| C EVAL pCondTok = %ADDR(InCondTok)
| *-----------------------------------------------------------------*
| * If substring error, then handle else percolate. *
| * Note that the message number value (MsgNo) is in hex. *
| *-----------------------------------------------------------------*
| C EXCEPT
| C IF MsgPrefix = 'RNX' AND
| C MsgNo = X'0100' AND
| C AllowError = '1'
| C EXCEPT Handling
| C EVAL Action = Resume
| C ELSE
| C EXCEPT Perclating
| C EVAL Action = Percolate
| C ENDIF
| C RETURN
| *=================================================================*
| * Procedure Output *
| *=================================================================*
| OQSYSPRT E
| O 'HDLR: In Handler for '
| O ProcName
| OQSYSPRT E Handling
| O 'HDLR: Handling...'
| OQSYSPRT E Perclating
| O 'HDLR: Percolating...'
Figure 116 (Part 2 of 2). Source for Condition Handler for Out-of-Bounds Substring Error
Figure 117 on page 242 shows the source for the procedure SHOWERR, in which
the condition handler RPGHDLR is registered.
The procedure parameters include a procedure pointer to RPGHDLR and a pointer
| to the communication area which contains a pointer to the module's PSDS and an
| indicator telling whether the out-of-bounds string error can be ignored. In addition, it
240 ILE RPG for AS/400 Programmer's Guide