HLASM Programmer's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Assembly error diagnostic messages

HLASM Programmer's Guide
SC26-4941-06

High Level Assembler prints most error messages in the listing immediately following the statement in error. It also prints the total number of flagged statements and their statement numbers in the Diagnostic Cross Reference and Assembler Summary section of the assembler listing.

The messages do not follow the statement in error when:
  • Errors are detected during editing of macro definitions read from a library. A message for such an error appears after the first call in the source program to that macro definition. You can, however, bring the macro definition into the source program with a COPY statement or using the LIBMAC assembler option. The editing error messages then follow immediately after the statements in error.
  • Errors are detected by the lookahead function of the assembler. (For attribute references, look-ahead processing scans for symbols defined on statements after the one being assembled.) Messages for these errors appear after the statements in which they occur. The messages can also appear at the point at which lookahead was called.
  • Errors are detected on conditional assembler statements during macro generation or MHELP testing. Such a message follows the most recently generated statement or MHELP output statement.
A typical error diagnostic message is:
** ASMA057E UNDEFINED OPERATION CODE — xxxxxxxx

A copy of a segment of the statement in error, represented above by xxxxxxxx, is appended to the end of many messages. Normally this segment begins at the bad character or term. For some errors, however, the segment begins after the bad character or term.

If a diagnostic message follows a statement generated by a macro definition, the following items might be appended to the error message:
  • The number of the model statement in which the error occurred, or the first five characters of the macro name.
  • The SET symbol, system variable, macro parameter, or value string associated with the error.

Macro Parameters: Messages reference three types of macro parameter: the name field parameter, keyword parameters, and positional parameters. A reference to the name field parameter is indicated by the word "NAME" appended to the message. References to keyword and positional parameters (for which there might be multiple occurrences) are in the form "KPARMnnnn" and "PPARMnnnn", where nnnn is the relative number of the parameter within the macro definition.

Figure 1 shows an example of a macro with messages referencing each type of variable or parameter.
Figure 1. Sample macro parameter messages
Active Usings: None
Loc  Object Code    Addr1 Addr2  Stmt   Source Statement                                  HLASM R6.0  2008/07/11 17.48
                                    1     MACRO                                                               00001000
                                       3          4                           4                  5 
                                    2 &z  parms &kw1=a,&kw2=b,&kw3=c,&kw4=d,&kw5=e,&kw6=f,&pp1,&pp2           00002000
                                    3 &c  SETC   'just a string'                                              00003000
                                    4 &ss SETA   &c                                                           00004000
                                    5 &sv SETA   &sysasm   2                                                  00005000
                                    6 &z1 SETA   &z   3                                                       00006000
                                    7 &k1 SETA   &kw1 <>  4                                                  00007000
                                    8 &k5 SETA   &kw5 <┘                                                      00008000
                                    9 &n  SETA   n'&syslist                                                   00009000
                                   10 &pn     SETA   &syslist(&n) <─┬>  5                                     00010000
                                   11 &p2     SETA   &pp2          <┘        ┌>  5                            00011000
                                   12     MEND                              ┌┴────┐                           00012000
 000000             00000 00000    13 default CSECT                         V     V                           00013000
                                   14 n   parms pp1,pp2,kw5=z,pp3,kw1=y,pp4,pp5,pp6                           00014000
 ASMA102E Arithmetic term is not self-defining term; default=0 - 00004/C   1 
 ASMA102E Arithmetic term is not self-defining term; default=0 - 00005/SYSASM   2 
 ASMA102E Arithmetic term is not self-defining term; default=0 - 00006/Z    3 
 ASMA102E Arithmetic term is not self-defining term; default=0 - 00007/KPARM00001 <>  4 
 ASMA102E Arithmetic term is not self-defining term; default=0 - 00008/KPARM00005 <┘
 ASMA102E Arithmetic term is not self-defining term; default=0 - 00010/PPARM00006 <>  5 
 ASMA102E Arithmetic term is not self-defining term; default=0 - 00011/PPARM00002 <┘
                                   15     END                                                                 00015000
Notes to Figure 1:
 1 
SET symbol, and related message
 2 
System variable symbol, and related message
 3 
The name field parameter, and related message
 4 
Keyword parameters, and related messages
 5 
Positional parameters, and related messages
Conditional Assembly: If a diagnostic message follows a conditional assembly statement in the source program, the following items are appended to the error message:
  • The word “OPENC”, meaning “open code”.
  • The SET symbol, or value string, associated with the error.

Multiple Messages: Several messages can be issued for a single statement or even for a single error within a statement. This happens because each statement is normally evaluated on more than one level (for example, term level, expression level, and operand level) or by more than one phase of the assembler. Each level or phase can diagnose errors; therefore, most or all the errors in the statement are flagged. Occasionally, duplicate error messages occur. This is a normal result of the error detection process.

Figure 1 is an example of High Level Assembler handling of error messages, and includes message ASMA435I to show the effect of the FLAG(RECORD) assembler option.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014