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.

AREAD instruction||If no operand is specified, the record to be read by AREAD is printed in the listingand assigned a statement number. The AREAD action is indicated in the listing bya minus sign between the statement number and the first character of the record.Repeated AREAD instruction statements read successive records. In the followingexample, the input record starting with INRECORD1 is read by the first AREADstatement, and assigned to the SETC symbol &VAL. The input record starting withINRECORD2 is read by the second AREAD statement, and assigned to the SETCsymbol &VAL1.Example:&VAL&VAL1MACROMAC1.AREAD.AREAD.MENDCSECT.MAC1INRECORD1 THIS IS THE STATEMENT TO BE PROCESSED FIRSTINRECORD2 THIS IS THE NEXT STATEMENT.END|The records read by the AREAD instruction can be in code brought in with theCOPY instruction, if the macro instruction appears in such code. If no more recordsexist in the code brought in by the COPY instruction, subsequent records are readfrom the AINSERT buffer or the primary input stream.Assign local time of dayThe second format of AREAD functions in much the same way as a SETCinstruction, but instead of supplying the value you want assigned to the SETCsymbol as a character string in the operand of the AREAD instruction, the value isprovided by the operating system in the form of an 8-character string containingthe local time. A Format-2 AREAD instruction does not cause the assembler to readthe statement following the macro instruction.Example:MACROMAC2.&VAL AREAD CLOCKBDC C’&VAL’&VAL1 AREAD CLOCKDDC C’&VAL1’.MENDWhen the macro definition described above is called, the following statements aregenerated:MAC2+ DC C’03251400’+ DC C’09015400’256 <strong>HLASM</strong>: <strong>V1R6</strong> <strong>Language</strong> <strong>Ref</strong>

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

Saved successfully!

Ooh no, something went wrong!