A script can be a simple, short
program or a long, complex program depending on what you want the script to do. All scripts must do at least three things:
- invoke the SAS System on the remote
host (by using the SAS command).
- set the appropriate communications options for the remote SAS session in the SAS command. On the remote host, the script sets
the COMAMID= and DMR system options.
- determine when the remote SAS session is ready for communications with the local SAS session. In most cases, the script
waits for messages from the remote SAS session.
Most scripts also perform a number of other optional functions. For example, they
may
- issue the remote host logon command and prompt the user for a userid and a password.
- issue informative messages
to the user about whether script execution is proceeding successfully.
- combine both SIGNON and SIGNOFF
functions.
- conditionally execute labeled portions of the script so that one script can accommodate multiple types of connections (for example, TCP/IP
connections to both a spawner and a TELNET daemon).
- issue remote host commands, such as commands that set session features or define remote host
files.
- define any response that is expected from the remote host.
- conditionally execute script subroutines to handle
successful operations and error conditions.
The sample scripts from SAS Institute perform all of these functions. By studying their contents,
you can learn how to use script statements to do these things.
Note: Scripts that log on to the remote host include information that is specific to
the computing installation. They may need minor modifications to work with your logon sequence.
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.