![]() Chapter Contents |
![]() Previous |
![]() Next |
| SAS Companion for the Microsoft Windows Environment |
filename test commport "com1:";
Next, read the data from COM1: into a SAS data set using
the TEST fileref. The following DATA step reads in the data, 1 byte at a
time, until the SAS System encounters an end-of-file (the hex value of end-of-file
is
'1a'x):
data acquire; infile test lrecl=1 recfm=f unbuffered; input i $; /* Read until you find an end-of-file. */ if i='1a'x then stop; run;
Two useful functions in data acquisition applications are SLEEP and WAKEUP. These functions enable you to control when your program is invoked. For example, you can use the WAKEUP function to start your program at exactly 2:00 a.m. For more information about these two functions, see SLEEP and WAKEUP.
| Communications Port Timeouts |
The COMTIMEOUT= option accepts the following values:
filename test commport "com1:"
comtimeout=EOF;
data test;
infile test length=linelen recfm=F;
input @;
if linelen ne 0 then input value;
else put 'Timeout reading from COM1:';
run;
| Options that Relate to Communications Port Timeouts |
These options relate to the communications port timeouts.
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.