home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1998 April A
/
Pcwk4a98.iso
/
Lotus
/
Domino46
/
LOTUS031.DSK
/
MODEMS
/
COMSERV.SCR
< prev
next >
Wrap
Text File
|
1993-03-26
|
7KB
|
203 lines
; -A COMMENTED ACQUIRE SCRIPT-
; Last revision date 03/26/93 (update this each time
; you edit, and save the edited file under another
; name to keep this one intact).
; This script is provided to show how an administrator
; might create a virtual circuit between a PC and
; a modem which are connected by communications
; servers.
; This script file is an editable example provided to
; help explain the contents and uses of a Notes
; Acquire script (.SCR) file. It was created for
; acquiring use of a pooled modem via a communications
; server. On the proper system, if edited such that
; the correct Arguments were supplied, this file could
; actually be fully functional. This file may also be
; used as a starting point for creating new script files
; for other communications servers.
; All non-blank lines not beginning with a semicolon
; should be edited for compatibility with commands,
; replies, and timeouts specific to the server you
; are dialing out from (consult with the appropriate
; vendors for further information). All blank lines
; and lines beginning with a semicolon are ignored by
; the Notes program; lines beginning with a semicolon
; are remarks to the reader. All other lines are part
; of the actual script.
; Note that there is also a sample CONNECT script
; provided in Notes, which also highlights many of the
; features of the scripting language (from the menu,
; click Tools, Call, Call Setup, then Edit to view the
; CONNECT script sprntpad.scr).
;===============================================
; In Notes' scripting language, the "DESC" parameter
; controls what is seen in the "Acquire Script" section
; of the "Specify Acquire Script Information"
; dialog box:
DESC Acquire a modem via a communications server.
; The "TYPE" parameter differentiates between a "Connect"
; script and an "Acquire" script. For using a pooled
; modem the TYPE must be "ACQUIRE". An Acquire script
; differs from a Connect script in that it is executed
; prior to the modem file, and is therefore used to
; obtain a connection to the modem. In this case, the
; modem is acquired from a communications server:
TYPE ACQUIRE
; You may want to force logging on, so that any errors
; will print to the Notes log file (log.nsf):
LOG ON
; Issue a 200 millisecond break, followed by a <CR>; this
; resets the connection between the PC and the server:
BREAK 2
; Wait 1 second, then send a Null string, terminated by a
; carriage return. In order to send a message that is not
; terminated by a carriage return, one can terminate the
; REPLY command with a semicolon.
; REPLY "Hello";
; for example would send the string "Hello" without a
; carriage return:
WAIT 1
REPLY ""
; Look for the communication server's prompt (this
; prompt should be specified to match the prompt used
; by your equipment). This WATCH command (below) has
; been set up to simply "fall through" on receipt of the
; comm serve prompt, since no explicit command follows the
; prompt string. The ERROR command would not be executed
; if the prompt was received, since the matched string
; causes successful termination of the WATCH command.
; Retry if a "TIMEOUT" response is received. If no
; response is received within 10 seconds, give up.
; Note the distinction here between the comm server
; sending the response, "TIMEOUT", and the WATCH
; command's 10-second timer elapsing. If the "TIMEOUT"
; response is received, this is a successful termination
; of the WATCH command, which results in the GOTO RETRY1
; command being executed. This causes subsequent commands
; to be executed starting at the label ":RETRY1", which
; re-executes the WATCH command. By contrast, if neither
; the prompt (following WATCH 10 FOR) or the "TIMEOUT"
; response is received within 10 seconds, then the WATCH
; command will terminate with an error condition, causing
; execution of the ERROR NORESPONSE command, which will
; go to the label :NORESPONSE, since an error occurred.
; (See the Failure section at the end of this script.)
:RETRY1
WATCH 10 FOR
Enter prompt here in quotes: this may be something
like "C/S>" or "CommServ>"
"TIMEOUT" GOTO RETRY1
; The ENDW command marks the end of the WATCH
; command, and the list of all "valid" responses to be
; watched for:
ENDW
; The ERROR command checks for an error on the last
; command executed, and goes to the label specified
; (listed in the Failure section at the end of the
; script) if there was an error:
ERROR NORESPONSE
; You should now be connected to the communications server.
; Issue a "DISC" command (disconnect), to make sure you
; are fully cleared from any previous session, wait 4
; seconds, and then issue the next command, which in this
; case requests a connection to a 9600 bps modem. A response
; with the string "connect" in it usually indicates a
; successful connection; anything else is treated as a failure.
; (Note that all commands and timeout values used here are
; system-specific, and may need modification for your
; communications server.)
REPLY "DISC"
WAIT 4
REPLY Type modem connection command here in quotes; this
might be something like "Connect 9600" or "C 9600"
; The next command is an example of a WAIT FOR command.
; Like the WAIT command, above, the number (in the
; following case, 15) indicates the length of time in
; seconds to WAIT. In this case, however, as in the
; WATCH command, there is also a specified string to
; wait for ("connect"). Successful receipt of this
; string within 15 seconds constitutes error-free
; termination of the command, while the elapsing of the
; timer constitutes an error, which will cause execution
; of the ERROR command, below, which branches to the label
; NOCONNECT (listed at the end of the script under the
; Failure section) if there was an error.
WAIT 15 FOR "connect"
; Note that the WAIT command is case-sensitive, so
; the case of the word "connect" is critical to success.
; The WATCH command could be used with multiple
; possible responses, if both upper- and lower-case
; reponses are valid.
ERROR NOCONNECT
END
; Failure section: Attempt to clean up the server session
;===============================================
; Note concerning LABELS:
; The script author may create as many labels as needed
; in order to send to the log a report on the point at
; which the script failed and why. Two labels were
; employed in this script. The message to the right
; of the FAIL command is what will be printed in the
; log.nsf file. Note that each label must begin with a
; colon. Both of these labels are also followed by
; REPLY commands which send a "DISC" command
; to the server in an attempt to clean things up and
; relinquish the modem before terminating.
:NORESPONSE
REPLY "DISC"
FAIL > Communications server did not respond
;===============================================
:NOCONNECT
REPLY "DISC"
FAIL > Could not establish connection with modem pool
;===============================================
; <end of script>