Example 14. Producing Messages in a Macro

1 MUL_I .macro x,y 2 .if ($symlen(x) ==0) 3 .emsg "ERROR -- Missing Parameter" 4 .mexit 5 .elseif ($symlen(y) == 0) 6 .emsg "ERROR -- Missing Parameter" 7 .mexit 8 .else ... 12 .endif 13 .endm 14 15 00000000 MUL_I 50, 51 1 .if ($symlen(x) ==0) 1 .emsg "ERROR -- Missing Parameter" 1 .mexit 1 .elseif ($symlen(y) == 0) 1 .emsg "ERROR -- Missing Parameter" 1 .mexit 1 .else ... 1 .endif 16 17 0000000c MUL_I 1 .if ($symlen(x) ==0) 1 .emsg "ERROR -- Missing Parameter" ***** USER ERROR ***** - : ERROR -- Missing Parameter 1 .mexit 1 Error, No Warnings