![]() Chapter Contents |
![]() Previous |
![]() Next |
| SAS Companion for the OS/2 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 character (the hexadecimal
value of the end-of-file character 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 functions that are useful in data acquisition applications are SLEEP and WAKEUP. These functions enable you to control when your program begins to execute. For example, you can use the WAKEUP function to cause your program to begin executing at exactly 2:00 a.m. For more information on 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.