home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 3 Comm
/
03-Comm.zip
/
zow314.exe
/
INSTALL.FIL
/
SCRIPT
/
RXSAMPLE
/
MANUAL
/
IF3.ZRX
< prev
next >
Wrap
Text File
|
1996-08-26
|
800b
|
31 lines
/* REXX sample about decisions */
/* Set max wait time to 60 seconds */
CALL ZocTimeout 60
/* Wait for 'Name?' - check for success and report error */
timeout= ZocWait("Name?")
IF timeout=0 THEN DO /* outer IF */
/* received 'Name?' */
CALL ZocSend "Joe User^M"
/* Wait for 'Password?' - check for success and report error */
timeout= ZocWait("Password?")
IF timeout=0 THEN DO
/* received 'Password?' */
CALL ZocSend "secret^M"
END
ELSE DO /* inner IF */
/* Ouch, 'Password?' was not received */
CALL ZocWriteln "ERROR (Password)!!"
CALL ZocHangup
END /* inner IF */
END
ELSE DO /* outer IF */
/* Ouch, 'Name?' was not received */
CALL ZocWriteln "ERROR (Name)!!"
CALL ZocHangup
END /* outer IF */
EXIT