/* Contact.rexx - Demonstrates calling Contact from ARexx */
/* Copyright (c) 1990 CMF Software.  Written by Craig Fisher */

/* Add the HyperActive program as a Rexx host at priority 0 */
call addlib 'Contact', 0

/* Tell Contact to go to first address */
call "SELECT FIRST"

SIGNAL ON ERROR
OPTIONS RESULTS

x = 0

DO forever
	/* Pause for 1 second */
	address command "wait 1"

	call "SELECT NEXT"
        x = x + 1
        if x > 20 then break
END

EXIT

ERROR:
 say "End of file"
 call "QUIT"
