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


Rules for concatenation

HLASM Language Reference
SC26-4940-06

If a symbolic parameter in a model statement is immediately preceded or followed by other characters or another symbolic parameter, the characters that correspond to the symbolic parameter are combined in the generated statement with the other characters, or with the characters that correspond to the other symbolic parameter. This process is called concatenation.

When variable symbols are concatenated to ordinary character strings, the following rules apply to the use of the concatenation character (a period). The concatenation character is mandatory when:
 1 
An alphanumeric character follows a variable symbol.
 2 
A left parenthesis that does not enclose a subscript follows a variable symbol.
 3  4 
A period (.) is to be generated. Two periods must be specified in the concatenated string following a variable symbol.
The concatenation character is not required when:
 5 
An ordinary character string precedes a variable symbol.
 6 
A special character, except a left parenthesis or a period, is to follow a variable symbol.
 7 
A variable symbol follows another variable symbol.
 8 
A variable symbol is used with a subscript. The concatenation character must not be used between a variable symbol and its subscript; otherwise, the characters are considered a concatenated string and not a subscripted variable symbol.

Table 1 gives the rules for concatenating variable symbols to ordinary character strings. The highlighted numbers correspond to the numbers in the mandatory and not required lists.

Table 1. Rules for concatenation
Concatenated String Values to be Substituted Generated Result
Variable Symbol Value
&FIELD.A    1 
&FIELDA
&FIELD&FIELDA AREASUM AREAASUM
&DISP.(&BASE)¹
           
     2      6 
&DISP&BASE 10010 100(10)
DC D'&INT..&FRACT'¹
         
         3 

DC D'&INT&FRACT'
         
         7 
&INT&FRACT 9988
DC D'99.88'
       
       4 

DC D'9988'
FIELD&A   5 
&A A FIELDA
&A+&B*3-D
    
  └──┴──  6 
&A&B AB A+B*3-D
&SYM(&SUBSCR)
     
     8 
&SUBSCR&SYM(10) 10ENTRY ENTRY
Notes:
  1. The concatenation character is not generated.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014