/* ARexx example for RexxFisher: * * Run this program while KFServer AND RexxFisher are running. * I'M MAKING NO EFFORT TO ASSURE THAT THESE TWO ARE AVAILABLE. * * Written by: Udo Schuermann * $VER: LockDemo 1.0 (1.3.95) * * Demonstrates how to lock/unlock KingFisher. This is useful * if you temporarily ADDRESS a different program and do not * wish to run the risk of another program using the vacated * port and messing us up when we return. * * The important thing to remember is to ALWAYS CALL RF_UNLOCK!!! * * NOTE: This script requires RexxFisher 1.10 for two reasons: * 1. RF_LOCK/RF_UNLOCK commands * 2. The RF_ prefixes are omitted here; this is optional * beginning with RexxFisher 1.10. */ options results address rexxfisher1 VERSION say "Hi, you are now connected to ..." result HELP say "" say "Here is some HELP for you, information on RexxFisher in other words:" say "" say result say "We now lock RexxFisher..." LOCK key = result /* As RexxFisher is now locked against "foreign" use, we could now ADDRESS * another program, and later come back. Just so we know what happens, * however, when a program now tries to use this REXXFISHER1 port (even we * ourselves) let's just try to get a version string from RexxFisher: */ say "Let's get a version inquiry..." VERSION say result /* You will notice that: * a) RexxFisher returned us an error code (which we don't check here, * but should, in this case) * b) 'result' contains, therefore, not a Style Guide compliant version * string, but an error message which we print out */ say "Let's unlock RexxFisher again, using our key" key UNLOCK key say result say "And NOW get a version inquiry..." VERSION say result say "Done. Bye-bye!"