HLASM Language Reference
HLASM Language Reference HLASM Language Reference
AREAD Instruction Assign Local Time ►►──SETC_symbol──AREAD──┬─CLOCKB─┬─────────────────────────────────►◄ └─CLOCKD─┘ SETC_symbol is a SETC symbol. See “SETC Instruction” on page 369. NOSTMT specifies that the statement to be read by the AREAD instruction is printed in the assembly listing, but not given any statement number. NOPRINT specifies that the statement does not appear in the listing, and no statement number is assigned to it. CLOCKB assigns an 8-character string to SETC_symbol containing the local time in hundredths of a second since midnight. CLOCKD assigns an 8-character string to SETC_symbol containing the local time in the format HHMMSSTH, where HH is a value between 00 and 23, MM and SS each have a value between 00 and 59, and TH has a value between 00 and 99. Assign Character String Value The first format of AREAD functions in much the same way as symbolic parameters, but instead of providing your input to macro processing as part of the | macro instruction, you can supply full input records from either the AINSERT buffer | (if any are present), or from the records in the primary input stream that follow immediately after the macro instruction. Any number of successive statements can be read into the macro for processing. SETC_symbol may be subscripted. When the assembler encounters a Format-1 AREAD statement during the processing of a macro instruction, it reads the source statement following the macro instruction and assigns an 80-character string to the SETC symbol in the name field. In the case of nested macros, it reads the statement following the outermost macro instruction. If no operand is specified, the statement to be read by AREAD is printed in the | listing and assigned a statement number. The AREAD action is indicated in the | listing by a minus sign between the statement number and the first character of the | record. Repeated AREAD instruction statements read successive statements. In the following example, the input record starting with INRECORD1 is read by the first AREAD statement, and assigned to the SETC symbol &VAL. The input record starting with INRECORD2 is read by the second AREAD statement, and assigned to the SETC symbol &VAL1. Example: 258 HLASM V1R5 Language Reference
ASPACE Instruction &VAL &VAL1 MACRO MAC1 . AREAD . AREAD . MEND CSECT . MAC1 INRECORD1 THIS IS THE STATEMENT TO BE PROCESSED FIRST INRECORD2 THIS IS THE NEXT STATEMENT . END The records read by the AREAD instruction can be in code brought in with the COPY instruction, if the macro instruction appears in such code. If no more records exist in the code brought in by the COPY instruction, subsequent statements are read from the AINSERT buffer or the primary input stream. Assign Local Time of Day The second format of AREAD functions in much the same way as a SETC instruction, but instead of supplying the value you want assigned to the SETC symbol as a character string in the operand of the AREAD instruction, the value is provided by the operating system in the form of an 8-character string containing the local time. A Format-2 AREAD instruction does not cause the assembler to read the statement following the macro instruction. Example: MACRO MAC2 . &VAL AREAD CLOCKB DC C'&VAL' &VAL1 AREAD CLOCKD DC C'&VAL1' . MEND When the macro definition described above is called, the following statements are generated: MAC2 + DC C'32514' + DC C'9154' ASPACE Instruction Use the ASPACE instruction to insert one or more blank lines in the listing of a macro definition in your source module. This separates sections of macro definition code on the listing page. ►►──┬─────────────────┬──ASPACE──┬─────────────────┬───────────────►◄ └─sequence_symbol─┘ └─number_of_lines─┘ Chapter 7. How to Specify Macro Definitions 259
- 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 276 and 277: Processing Statements Processing St
- 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
- Page 326 and 327: Sublists in Operands &SYSLIST( n,m)
ASPACE Instruction<br />
&VAL<br />
&VAL1<br />
MACRO<br />
MAC1<br />
.<br />
AREAD<br />
.<br />
AREAD<br />
.<br />
MEND<br />
CSECT<br />
.<br />
MAC1<br />
INRECORD1 THIS IS THE STATEMENT TO BE PROCESSED FIRST<br />
INRECORD2 THIS IS THE NEXT STATEMENT<br />
.<br />
END<br />
The records read by the AREAD instruction can be in code brought in with the<br />
COPY instruction, if the macro instruction appears in such code. If no more<br />
records exist in the code brought in by the COPY instruction, subsequent<br />
statements are read from the AINSERT buffer or the primary input stream.<br />
Assign Local Time of Day<br />
The second format of AREAD functions in much the same way as a SETC<br />
instruction, but instead of supplying the value you want assigned to the SETC<br />
symbol as a character string in the operand of the AREAD instruction, the value is<br />
provided by the operating system in the form of an 8-character string containing the<br />
local time. A Format-2 AREAD instruction does not cause the assembler to read<br />
the statement following the macro instruction.<br />
Example:<br />
MACRO<br />
MAC2<br />
.<br />
&VAL AREAD CLOCKB<br />
DC C'&VAL'<br />
&VAL1 AREAD CLOCKD<br />
DC C'&VAL1'<br />
.<br />
MEND<br />
When the macro definition described above is called, the following statements are<br />
generated:<br />
MAC2<br />
+ DC C'32514'<br />
+ DC C'9154'<br />
ASPACE Instruction<br />
Use the ASPACE instruction to insert one or more blank lines in the listing of a<br />
macro definition in your source module. This separates sections of macro definition<br />
code on the listing page.<br />
►►──┬─────────────────┬──ASPACE──┬─────────────────┬───────────────►◄<br />
└─sequence_symbol─┘<br />
└─number_of_lines─┘<br />
Chapter 7. How to Specify Macro Definitions 259