home *** CD-ROM | disk | FTP | other *** search
- /*
- * SampleCall -- A short program that calls our sample command host...
- */
-
- options failat 1000
- options results
-
- if( ~show( 'p', 'SAMPLEHOST' ) )then do
- say "Please start SAMPLEHOST first."
- exit 10
- end
-
- options prompt "Please enter a command or 'help': "
-
- do forever
- parse pull linein
-
- if( upper( linein ) = 'HELP' )then
- do
- say
- say " Type a command to be sent to SAMPLEHOST. Valid commands"
- say " are:"
- say " set rc <number>"
- say " set result <string or number>"
- say " get rc"
- say " get result"
- say " exit"
- say " The values of RC and RESULT that are returned by the"
- say " command will be printed to the screen."
- say ""
- end
- else
- do
- address 'SAMPLEHOST' linein
- say "Replied with RC =" rc
- say " RESULT =" result
- end
-
- if( upper( linein ) = 'EXIT' )then break
- end
-
- exit 0
-