22.02.2015 Views

HLASM Language Reference

HLASM Language Reference

HLASM Language Reference

SHOW MORE
SHOW LESS

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

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

AREAD Instruction<br />

Assign Local Time<br />

►►──SETC_symbol──AREAD──┬─CLOCKB─┬─────────────────────────────────►◄<br />

└─CLOCKD─┘<br />

SETC_symbol<br />

is a SETC symbol. See “SETC Instruction” on page 369.<br />

NOSTMT<br />

specifies that the statement to be read by the AREAD instruction is printed in<br />

the assembly listing, but not given any statement number.<br />

NOPRINT<br />

specifies that the statement does not appear in the listing, and no statement<br />

number is assigned to it.<br />

CLOCKB<br />

assigns an 8-character string to SETC_symbol containing the local time in<br />

hundredths of a second since midnight.<br />

CLOCKD<br />

assigns an 8-character string to SETC_symbol containing the local time in the<br />

format HHMMSSTH, where HH is a value between 00 and 23, MM and SS<br />

each have a value between 00 and 59, and TH has a value between 00 and<br />

99.<br />

Assign Character String Value<br />

The first format of AREAD functions in much the same way as symbolic<br />

parameters, but instead of providing your input to macro processing as part of the<br />

| macro instruction, you can supply full input records from either the AINSERT buffer<br />

| (if any are present), or from the records in the primary input stream that follow<br />

immediately after the macro instruction. Any number of successive statements can<br />

be read into the macro for processing.<br />

SETC_symbol may be subscripted. When the assembler encounters a Format-1<br />

AREAD statement during the processing of a macro instruction, it reads the source<br />

statement following the macro instruction and assigns an 80-character string to the<br />

SETC symbol in the name field. In the case of nested macros, it reads the<br />

statement following the outermost macro instruction.<br />

If no operand is specified, the statement to be read by AREAD is printed in the<br />

| listing and assigned a statement number. The AREAD action is indicated in the<br />

| listing by a minus sign between the statement number and the first character of the<br />

| record.<br />

Repeated AREAD instruction statements read successive statements. In the<br />

following example, the input record starting with INRECORD1 is read by the first<br />

AREAD statement, and assigned to the SETC symbol &VAL. The input record<br />

starting with INRECORD2 is read by the second AREAD statement, and assigned to<br />

the SETC symbol &VAL1.<br />

Example:<br />

258 <strong>HLASM</strong> V1R5 <strong>Language</strong> <strong>Reference</strong>

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

Saved successfully!

Ooh no, something went wrong!