Syntax
CALL "rsreadm.wbb",filename$,key1$,key2$,knum,ky$[all],rec$[all],count,errmsg$
This program communicates with a running "rswatch.wbb" task on another system and scans the file for an available port to issue a request on. Each serial port has a corresponding "rswatch" task running on the target system. A library of available serial ports is maintained in the text file "rsttys.txt".
By using a dedicated serial connection between a live Business Basic system and a Web server system connected to the Internet, it is possible to avoid potential security issues of having a TCT/IP connection to the live system. While a dedicated serial connection is slower and doesn't support concurrency, it is secure.
filename$ is the name of the file on the target system to access. It can be a full pathname, or any name accessible to the task running rswatch.wbb on the target system.
key1$ and key2$ specify the key range to read and return. All records from key1$+$00$ through key2$+$FF$ are included, so "001" for both would successfully return key values from "001001" through "001ZZZ".
knum is the secondary key chain to use if the target file is a multi-keyed file.
ky$[all] and rec$[all] are arrays that store returned keys and associated records. Values are stored in ky$[1..count] and rec$[1..count]. If count is 0, the the arrays may not be defined.
count contains the number of records returned in the ky$[] and rec$[] arrays, or 0 if no records were found.
errmsg$ returns an error message if an error occurred.