11.07.2015 Views

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Symbolic parametersBy using symbolic parameters with meaningful names, you can indicate thepurpose for which the parameters (or substituted values) are used.Symbolic parameters must be valid variable symbols. A symbolic parameterconsists of an ampersand followed by an alphabetic character and from 0 to 61alphanumeric characters.The following are valid symbolic parameters:&READER&A23456&X4F2&LOOP2&N&$4The following are not valid symbolic parameters:CARDAREA first character is not an ampersand&256B first character after ampersand is not alphabetic&BCD%34 contains a special character other than initial ampersand&IN AREA contains a special character [space] other than initial ampersandSymbolic parameters have a local scope; that is, the name and value they areassigned only applies to the macro definition in which they have been declared.The value of the parameter remains constant throughout the processing of thecontaining macro definition during each call of that definition.Notes:1. Symbolic parameters must not have multiple definitions or be identical to anyother variable symbols within the given local scope. This applies to the systemvariable symbols described in “System variable symbols” on page 259, and tolocal-scope and global-scope SET symbols described in “SET symbols” on page316.2. Symbolic parameters should not begin with &SYS because these characters areused for system variable symbols provided with High Level Assembler.The two kinds of symbolic parameters are:v Positional parametersv Keyword parametersEach positional or keyword parameter used in the body of a macro definition mustbe declared in the prototype statement.The following is an example of a macro definition with symbolic parameters.MACROHeader&NAME MOVE &TO,&FROM Prototype&NAME ST 2,SAVE ModelL 2,&FROM ModelST 2,&TO ModelL 2,SAVE ModelMENDTrailerIn the following macro instruction that calls the above macro, the characters HERE,FIELDA, and FIELDB of the MOVE macro instruction correspond to the symbolicparameters &NAME, &TO, and &FROM, respectively, of the MOVE prototype statement.HERE MOVE FIELDA,FIELDBIf the preceding macro instruction were used in a source program, the followingassembler language statements would be generated:Chapter 7. How to specify macro definitions 251

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!