home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_disks
/
300-399
/
ff330.lzh
/
Vt100
/
RexxSamples
/
Forward.rexx
next >
Wrap
OS/2 REXX Batch file
|
1990-03-02
|
893b
|
46 lines
/* An AREXX macro to demonstrate the FORWARD command and its use. It will
** open a port and request VT100 to forward received data to this port. It
** will then await 3 messages from VT100 (3 batches of data) and then will ask
** VT100 to quit forwarding received data, close the port and exit.
**/
trace R
address VT100-serial.device-00
if show("L", "rexxsupport.library") = 0
then call addlib "rexxsupport.library", 0, -30, 0
portname = "REXX-VT100"
port = openport(portname)
if Port = '0000 0000'x
then do
say "Couldn't open the port."
exit 20
end
"FORWARD" portname
do i = 1 to 3
packet = getpkt(portname)
if packet = '0000 0000'x
then do
call waitpkt portname
packet = getpkt(portname)
end
call reply packet, 0
end
'FORWARD'
packet = getpkt(portname)
do while packet ~= '0000 0000'x
call reply packet, 0
packet = getpkt(portname)
end
call closeport port
exit