02.07.2013 Views

Type III C lass A Program

Type III C lass A Program

Type III C lass A Program

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.

COLE<br />

o<br />

1<br />

2<br />

3<br />

4<br />

5<br />

6<br />

1<br />

8<br />

9<br />

11<br />

12<br />

13<br />

MEANING<br />

no error<br />

file type not found<br />

buffer area not in core<br />

disk error<br />

illegal mode letter<br />

item nurober is 0<br />

no core available<br />

file not in correct format<br />

buffer too small (truncated item)<br />

file open for writing<br />

incorrect number of items<br />

end of file<br />

mode number invalid<br />

Figure 27. RDBUF error return codes<br />

(returned in register 15)<br />

Example:<br />

READA RDBUF INFIL,AREA=BUF,ERROR=EOF<br />

NEXT<br />

B READA<br />

EOF CREOF ERREAD<br />

BUF DS CL80<br />

INFIL FCB (ELIPR, DATA) " BUF<br />

Assuming that the RDBUF macro is preceded by a STATE SINFIL<br />

and a SETUP INFIL. this sequence reads successive items from<br />

the file ELIPR DATA Pn. Items are placed in BUF" and<br />

control returned at NEXT. When end of file is reached,<br />

control goes to EOF where CKEOF checks for a 12 in register<br />

15. If any other value is in register 15, control goes to<br />

ERREAD.<br />

RDBUF Macro 285

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

Saved successfully!

Ooh no, something went wrong!