HLASM Language Reference
HLASM Language Reference HLASM Language Reference
Processing Statements Processing Statements Conditional Assembly Instructions Conditional assembly instructions let you determine at conditional assembly time the content of the generated statements and the sequence in which they are generated. The instructions and their functions are listed below: Conditional Assembly GBLA, GBLB, GBLC LCLA, LCLB, LCLC SETA, SETB, SETC SETAF, SETCF ACTR AGO AIF ANOP Operation Done Declaration of variable symbols (global-scope and local-scope SET symbols) and setting of default initial values Assignment of values to variable symbols (SET symbols) External function assignment of values to variable symbols (SET symbols) Setting loop counter Unconditional branch Conditional branch (based on logical test) Pass control to next sequential instruction (no operation) Conditional assembly instructions can be used both inside macro definitions and in open code. They are described in Chapter 9, “How to Write Conditional Assembly Instructions.” Inner Macro Instructions Macro instructions can be nested inside macro definitions, allowing you to call other macros from within your own definition. Other Conditional Assembly Instructions Several additional instructions can help you write your macro definitions. The instructions and their functions are listed below: Inner Macro Instruction AEJECT AINSERT AREAD ASPACE COPY MEXIT Operation Done Skip to next page Insert statement into input stream Assign an arbitrary character string to a variable symbol (SETC symbol) Insert one or more blank lines in listing Copy the source statements from a source language library member. Exit from the macro definition 256 HLASM V1R5 Language Reference
AEJECT Instruction AEJECT Instruction Use the AEJECT instruction to stop the printing of the assembler listing of your macro definition on the current page, and continue the printing on the next page. ►►──┬─────────────────┬──AEJECT────────────────────────────────────►◄ └─sequence_symbol─┘ sequence_symbol is a sequence symbol. The AEJECT instruction causes the next line of the assembly listing of your macro definition to be printed at the top of a new page. If the line before the AEJECT statement appears at the bottom of a page, the AEJECT statement has no effect. An AEJECT instruction immediately following another AEJECT instruction causes a blank page in the listing of the macro definition. Notes: 1. The AEJECT instruction can only be used inside a macro definition. 2. The AEJECT instruction itself is not printed in the listing. 3. The AEJECT instruction does not affect the listing of statements generated when the macro is called. AINSERT Instruction The AINSERT instruction, inside macro definitions, harnesses the power of macros to generate source statements, for instance, using variable substitution. Generated statements are queued in a special buffer and read after the macro generator finishes. The specifications for the AINSERT instruction, which can also be used in open code, are described in “AINSERT Instruction” on page 108. AREAD Instruction The AREAD instruction assigns an arbitrary character string value to a SETC symbol. The AREAD instruction has two formats. The first format lets you assign to a SETC symbol the character string value of a statement that is placed immediately after a macro instruction. The AREAD instruction can only be used inside macro definitions. Assign Character String Value ►►──SETC_symbol──AREAD──┬─────────┬────────────────────────────────►◄ ├─NOPRINT─┤ └─NOSTMT──┘ The second format of the AREAD instruction assigns to a SETC symbol a character string containing the local time. Chapter 7. How to Specify Macro Definitions 257
- Page 226 and 227: PRINT Instruction Note: If the next
- Page 228 and 229: Process Statement Process Statement
- Page 230 and 231: REPRO Instruction NOPRINT instructs
- Page 232 and 233: RSECT Instruction 4. AMODE or RMODE
- Page 234 and 235: START Instruction START Instruction
- Page 236 and 237: TITLE Instruction The name value is
- Page 238 and 239: USING Instruction Only the characte
- Page 240 and 241: USING Instruction Base Registers fo
- Page 242 and 243: USING Instruction If register 0 is
- Page 244 and 245: USING Instruction A variable symbo
- Page 246 and 247: USING Instruction In this MVC instr
- Page 248 and 249: USING Instruction Range of a Depend
- Page 250 and 251: XATTR Instruction external_symbol i
- Page 252 and 253: XATTR Instruction SCOPE ►►─
- Page 254 and 255: XATTR Instruction 234 HLASM V1R5 La
- Page 256 and 257: Part 3. Macro Language &SYSDATC Sys
- Page 258 and 259: Introduction to Macro Language Chap
- Page 260 and 261: Introduction to Macro Language The
- Page 262 and 263: Introduction to Macro Language Macr
- Page 264 and 265: MACRO and MEND Statements The assem
- Page 266 and 267: Prototype Statement Macros that are
- Page 268 and 269: Model Statements generated from tha
- Page 270 and 271: Model Statements ▌5▐ ▌6▐
- Page 272 and 273: Model Statements Notes: 1. You can
- Page 274 and 275: Positional Parameters Symbolic para
- Page 278 and 279: AREAD Instruction Assign Local Time
- Page 280 and 281: COPY Instruction sequence_symbol is
- Page 282 and 283: System Variable Symbols System Vari
- Page 284 and 285: &SYSADATA_MEMBER System Variable Sy
- Page 286 and 287: &SYSCLOCK System Variable Symbol &S
- Page 288 and 289: &SYSECT System Variable Symbol depe
- Page 290 and 291: &SYSIN_MEMBER System Variable Symbo
- Page 292 and 293: &SYSJOB System Variable Symbol &SYS
- Page 294 and 295: &SYSLIN_DSN System Variable Symbol
- Page 296 and 297: &SYSLIST System Variable Symbol The
- Page 298 and 299: &SYSLOC System Variable Symbol To
- Page 300 and 301: &SYSM_SEV System Variable Symbol &S
- Page 302 and 303: &SYSNDX System Variable Symbol The
- Page 304 and 305: &SYSOPT_DBCS System Variable Symbol
- Page 306 and 307: &SYSPARM System Variable Symbol Not
- Page 308 and 309: &SYSPRINT_MEMBER System Variable Sy
- Page 310 and 311: &SYSPUNCH_MEMBER System Variable Sy
- Page 312 and 313: &SYSSTEP System Variable Symbol Not
- Page 314 and 315: &SYSTERM_DSN System Variable Symbol
- Page 316 and 317: &SYSTIME System Variable Symbol Not
- Page 318 and 319: Macro Instruction Format sequence_s
- Page 320 and 321: Macro Instruction Format Operand En
- Page 322 and 323: Macro Instruction Format When you n
- Page 324 and 325: Sublists in Operands the order in w
Processing Statements<br />
Processing Statements<br />
Conditional Assembly Instructions<br />
Conditional assembly instructions let you determine at conditional assembly time<br />
the content of the generated statements and the sequence in which they are<br />
generated. The instructions and their functions are listed below:<br />
Conditional Assembly<br />
GBLA, GBLB, GBLC<br />
LCLA, LCLB, LCLC<br />
SETA, SETB, SETC<br />
SETAF, SETCF<br />
ACTR<br />
AGO<br />
AIF<br />
ANOP<br />
Operation Done<br />
Declaration of variable symbols (global-scope and local-scope<br />
SET symbols) and setting of default initial values<br />
Assignment of values to variable symbols (SET symbols)<br />
External function assignment of values to variable symbols<br />
(SET symbols)<br />
Setting loop counter<br />
Unconditional branch<br />
Conditional branch (based on logical test)<br />
Pass control to next sequential instruction (no operation)<br />
Conditional assembly instructions can be used both inside macro definitions and in<br />
open code. They are described in Chapter 9, “How to Write Conditional Assembly<br />
Instructions.”<br />
Inner Macro Instructions<br />
Macro instructions can be nested inside macro definitions, allowing you to call other<br />
macros from within your own definition.<br />
Other Conditional Assembly Instructions<br />
Several additional instructions can help you write your macro definitions. The<br />
instructions and their functions are listed below:<br />
Inner Macro Instruction<br />
AEJECT<br />
AINSERT<br />
AREAD<br />
ASPACE<br />
COPY<br />
MEXIT<br />
Operation Done<br />
Skip to next page<br />
Insert statement into input stream<br />
Assign an arbitrary character string to a variable symbol<br />
(SETC symbol)<br />
Insert one or more blank lines in listing<br />
Copy the source statements from a source language<br />
library member.<br />
Exit from the macro definition<br />
256 <strong>HLASM</strong> V1R5 <strong>Language</strong> <strong>Reference</strong>