Assembly error diagnostic messages
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.
- 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.
** 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.
- 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.
Sample Program3 - HLASM Page 3
Active Usings: None
Loc Object Code Addr1 Addr2 Stmt Source Statement HLASM R6.0 2015/02/21 11.11
15 MACRO
3 4 4 5
16 &z parmmac &kw1=a,&kw2=b,&kw3=c,&kw4=d,&kw5=e,&kw6=f,&pp1,&pp2
17 &c SETC 'Hello String'
18 &ss SETA &c
19 &sv SETA &sysasm 2
20 &z1 SETA &z 3
21 &k1 SETA &kw1 4
22 &k5 SETA &kw5 4
23 &n SETA n'&syslist
24 &pn SETA &syslist(&n) 5
25 &p2 SETA &pp2 5
26 MEND
00000000 00000000 00000000 27 samp03 CSECT 5 5
28 macp parmmac pp1,pp2,kw5=z,pp3,kw1=y,pp4,pp5,pp6
** ASMA102E Arithmetic term is not self-defining term; default=0 - 00018/C 1
** ASMA435I Record 18 in SMORSA.BOOK.SAMPLE.ASM(SAMP03) on volume: 37P003
** ASMA102E Arithmetic term is not self-defining term; default=0 - 00019/SYSASM 2
** ASMA435I Record 19 in SMORSA.BOOK.SAMPLE.ASM(SAMP03) on volume: 37P003
** ASMA102E Arithmetic term is not self-defining term; default=0 - 00020/NAME 3
** ASMA435I Record 20 in SMORSA.BOOK.SAMPLE.ASM(SAMP03) on volume: 37P003
** ASMA102E Arithmetic term is not self-defining term; default=0 - 00021/KPARM00001 4
** ASMA435I Record 21 in SMORSA.BOOK.SAMPLE.ASM(SAMP03) on volume: 37P003
** ASMA102E Arithmetic term is not self-defining term; default=0 - 00022/KPARM00005 4
** ASMA435I Record 22 in SMORSA.BOOK.SAMPLE.ASM(SAMP03) on volume: 37P003
** ASMA102E Arithmetic term is not self-defining term; default=0 - 00024/PPARM00006 5
** ASMA435I Record 24 in SMORSA.BOOK.SAMPLE.ASM(SAMP03) on volume: 37P003
** ASMA102E Arithmetic term is not self-defining term; default=0 - 00025/PPARM00002 5
** ASMA435I Record 25 in SMORSA.BOOK.SAMPLE.ASM(SAMP03) on volume: 37P003
29 end
- 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
- 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.
Batch Assemblies: Where multiple assemblies are being performed in a single step with the BATCH option, a summary line will be printed after the final assembly listing summarizing the number of assemblies processed and their highest return code.