HLASM Language Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


END instruction

HLASM Language Reference
SC26-4940-06

Use the END instruction to end the assembly of a program. You can also supply an address in the operand field to which control can be transferred after the program is loaded. The END instruction must always be the last statement in the source program.
Read syntax diagramSkip visual syntax diagram
>>-+-----------------+--END--+------------+--+-----------+-----><
   '-sequence_symbol-'       '-expression-'  '-,language-'   

sequence_symbol
Is a sequence symbol.
expression
Specifies the point to which control can be transferred when loading of the object program completes. If the GOFF option is in effect this parameter is ignored. This point is normally the address of the first executable instruction in the program, as shown in the following sequence:
NAME     CSECT
AREA     DS              50F
BEGIN    BALR            2,0
         USING           *,2
         .
         .
         .
         END             BEGIN
If specified, expression can be generated by substitution into variable symbols. It must not be a literal. It must also satisfy one of these conditions:
  • It is a simply relocatable expression representing an address in the source module delimited by the END instruction.
  • If it contains an external symbol, the external symbol must be the only term in the expression, or the remaining terms in the expression must reduce to zero.
language
A marker for use by language translators that produce assembly code. The operand has three suboperands. The values in the operand are copied into the END record in the object deck if the NOGOFF option is specified, or in a B_IDRL record if the GOFF option is specified.
The syntax of the operand is
(char10,char4,char5)
where all three suboperands and the commas and parentheses are required.
char10 is a one to ten character code. It is intended to be a language translator identifier. char4 must be exactly four characters long. It is intended to be a version and release code. char5 must be exactly five characters long, and should be a date in the format "YYDDD". It is intended to be the compile date. For example:
    END    ENTRYPT,(MYCOMPILER,0101,00273)
Notes:
  1. If the END instruction is omitted, one is generated by the assembler, and message ASMA140W END record missing is issued.
  2. Refer to the text in Generating END statements about lookahead processing, and the effect it has on generated END statements.
  3. If the END statement is not the last statement in the input stream, and the BATCH option has been specified, the assembler initiates assembly of a new source module when the current assembly is completed. (For more information about the BATCH option, see the section "BATCH" in the HLASM Programmer's Guide)

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014