Messages

Compiler messages are preceded by the erroneous source line. However, if the error does not occur in the REXX program, for example if there is an incorrect option or an error opening the output file, the error messages precede the first source line. If you request a source listing, the messages are interspersed in the listing, as shown in Figure 1. Otherwise, only the erroneous source lines and their corresponding messages are included in the listing.

Notice that there is a vertical bar between the source line and the message line. This marker is placed at or near the part of the instruction in the printed source line, continuation line, or split line that caused the message. One error may cause more than one message.

The result of an expression following an INTERPRET instruction is not analyzed by the Compiler. If it contains errors, they are detected only when the INTERPRET instruction is executed.
Figure 1. Extract of Source Listing with Messages as Printed under z/OS®
1===> Source Listing             SYS03140.T154049.RA000.RXTLISTS.SYSINPDS.H01(ROULETTE)
 IBM Compiler for REXX on System z 4.0  LVL -NONE--    Time: 15:40:51       Date: 2003-05-20                    Page:    2
  If  Do Sel  Line C ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8 Sequence Incl  Recd

                 1   /* REXX ****************************************************************00010000                   1
                 2   *                Roulette Implementation in REXX                        00020000                   2
                 3   * This program can be used instead of the wheel usually employed in     00030000                   3
                 4   * casinos.                                                              00040000                   4
                 5   * Press enter to proceed to the game's next step.                       00050000                   5
                 6   * After the display of a number you can stop play by entering "end".    00060000                   6
                 7   *                                                                       00070000                   7
                 8   ***********************************************************************/00080000                   8
                 9   Call set_color                      /* initialize c.i with color of i */00090000                   9
                10   rr.=0                               /* initialize statistics          */00100000                  10
                11   Say '** Welcome to Roulette **'     /* welcome the user               */00110000                  11
                12   Do Forever                          /* repeat till end requested      */00120000                  12
       1        13     Say                               /* an empty separator line        */00130000                  13
       1        14     Say 'Faites vos jeux'             /* ask players to make their bets */00140000                  14
       1        15     Call pause('W')                   /* wait for input to proceed      */00150000                  15
       1        16     Say 'Rien ne va plus'             /* stop them                      */00160000                  16
       1        17     Call pause('W')                   /* wait for input to proceed      */00170000                  17
       1        18     r=Random(0,36)                    /* get random number from 0 to 36 */00180000                  18
       1        19     rr,r=rr.r+1;                      /* maintain statistics            */00190000                  19
                         |
 +++FANPAR0566S Unexpected "," in expression
       1        20     If r=0 Then                       /* zero                           */00200000                  20
   1   1        21       Say ' 0 ZERO'                   /* good for the casino            */00210000                  21
       1        22     Else Do                           /* any other number (1 to 36)     */00220000                  22
   1   2        23       If r//2=0 Then                  /* even number                    */00230000                  23
   2   2        24         pi='pair';                    /*   in French                    */00240000                  24
   1   2        25       Else                            /* odd number                     */00250000                  25
   2   2        26         pi='impair';                  /*   in French                    */00260000                  26
   1   2        27       If r<=18  Then                  /* lower half                     */00270000                  27
   2   2        28         mp='manque';                  /*   in French                    */00280000                  28
   1   2        29       Else                            /* upper half                     */00290000                  29
   2   2        30         mp='passe'                    /*   in French                    */00300000                  30
   1   2        31       Say Right(r,2) Left(pi,6) c.r mp  /* show where the ball stopped  */00310000                  31
   1   1        32       End                             /* and the number's attributes    */00320000                  32
       1        33     If pause('E')=      Then          /* check if termination request   */00330000                  33
                                    |
 +++FANPAR0561S Right operand missing
   1   1        34       Leave                           /* If so, end the loop            */00340000                  34
                35     End                               /* end of one game, ready for next*/00350000                  35
                36   Say '     ** Merci et au revoir **' /* thanks and good bye            */00360000                  36
                37   Exit                                /* Exit the program               */00370000                  37
                38                                                                           00380000                  38
                39   set_color:                                                              00390000                  39
                40   /*%Include setcolor*/                                                   00400000                  40
                41   set_color:          /* Set up c.i to contain the color of each number */         00010000    1     1
                     |
 +++FANPAR0071W Duplicate label: Only first occurrence on line 39 used
                42     c.='noir '                        /* set all of them to black       */         00020000    1     2
                43     rouge='1 3 5 7 9 12 14 16 18 19 21 23 25 27 30 32 34 36'                       00030000    1     3
                44     Do While rouge¬=''                /* process list of red numbers    */         00040000    1     4
       1        45       Parse Var rouge t rouge         /* pick the first in the list     */         00050000    1     5
1===> Source Listing             SYS03140.T154049.RA000.RXTLISTS.SYSINPDS.H01(ROULETTE)
 IBM Compiler for REXX on System z 4.0  LVL -NONE--    Time: 15:40:51       Date: 2003-05-20                    Page:    3
  If  Do Sel  Line C ----+----1----+----2----+----3----+----4----+----5----+----6----+----7--<-+----8 Sequence Incl  Recd

       1        46       c.t='rouge'                     /* set its color to red           */         00060000    1     6
                47       End                                                                          00070000    1     7
                48     Return