11.07.2015 Views

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

HLASM: V1R6 Language Ref

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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

&SYSNDX System Variable Symbolv Be concatenated to a symbol containing 59 characters or fewer2. The value of the type attribute of &SYSNDX (T'&SYSNDX) is always N.3. The value of the count attribute (K'&SYSNDX) is equal to the number of digitsgenerated. If a symbol generated by one macro is to be referenced by codegenerated by another macro, the two macros must provide means forcommunicating the necessary information. Their respective values of &SYSNDXcannot be guaranteed to differ by any fixed amount.The example that follows shows the use of &SYSNDX, and a way to communicatelocal &SYSNDX values among macro instructions. It is assumed that the firstmacro instruction processed, OUTER1, is the 106th macro instruction processed bythe assembler.MACROINNER1GBLC&NDXNUMA&SYSNDX SR 2,5 Statement 1CR 2,5BE B&NDXNUM Statement 2B A&SYSNDX Statement 3MENDMACRO&NAME OUTER1GBLC&NDXNUM&NDXNUM SETC ’&SYSNDX’ Statement 4&NAME SR 2,4AR 2,6INNER1 Statement 5B&SYSNDX S 2,=F’1000’ Statement 6MEND-------------------------------------------------------------------ALPHA OUTER1 Statement 7BETA OUTER1 Statement 8-------------------------------------------------------------------ALPHA SR 2,4AR 2,6A0107 SR 2,5CR 2,5BEB0106BA0107B0106 S 2,=F’1000’BETA SR 2,4AR 2,6A0109 SR 2,5CR 2,5BEB0108BA0109B0108 S 2,=F’1000’Statement 7 is the 106th macro instruction processed. Therefore, &SYSNDX isassigned the number 0106 for that macro instruction. The number 0106 issubstituted for &SYSNDX when it is used in statements 4 and 6. Statement 4 isused to assign the character value 0106 to the SETC symbol &NDXNUM Statement 6 isused to create the unique name B0106.Statement 5 is the 107th macro instruction processed. Therefore, &SYSNDX isassigned the number 0107 for that macro instruction. The number 0107 issubstituted for &SYSNDX when it is used in statements 1 and 3. The number 0106is substituted for the global-scope SETC symbol &NDXNUM in statement 2.Chapter 7. How to specify macro definitions 279

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

Saved successfully!

Ooh no, something went wrong!