OS2World OLD-STATIC-BACKUP Forum

OS/2 - SIGs => Rexx => Topic started by: Fahrvenugen on 2010.01.21, 23:13:56

Title: How to monitor serial port in REXX?
Post by: Fahrvenugen on 2010.01.21, 23:13:56
Hi,

I'm probably overlooking something very obvious, but I need to find a way to be able to monitor the status of the CTS line on the serial port from within a REXX script.  I've got an external device which will toggle this status, and I need to write a script to have a system do one thing if CTS is high, another if CTS is low.

Unfortunately I havn't found this yet.  Anyone know how to do this?  Again, its probably simple, and I'm just overlooking something.

Thanks.
Title: Re: How to monitor serial port in REXX?
Post by: Andi on 2010.01.22, 21:14:47
There are REXX libraries like rexxasync (?) which most probably let you do what you like. But I never did such things in REXX. Another possibility will be to parse the output of the system command 'mode com1'. At least under 4os2 I see here the status of CTS. Not really sure but probably the standard command shell will do it too.