Chapter Contents


Communications Access Methods for SAS/CONNECT and SAS/SHARE Software

General Script Statement Rules

This section contains general rules for writing script statements. A script statement that is not valid for your access method is ignored. For details about the statements that are used in the scripts, see SAS/SHARE User's Guide.


The techniques that are used in these scripts are basic to writing scripts.

When writing a script or modifying an existing script, pay special attention to the WAITFOR and the TYPE statements. To ensure that the script recognizes the expected prompt during each stage of signing on, you must be careful to specify the exact sequence of prompts and responses for the remote host. The simplest method for determining sequence is to go to the remote host and to manually go through the process that you want to capture in the WAITFOR and the TYPE statements. For each display on the remote host, choose a word from that display for the WAITFOR statement. Whatever information that you type to respond to a display should be captured in the TYPE statement. Be sure to note all carriage returns or other special keys.

For example, if TSO is the remote host and you need to use a TYPE statement in a sign-on script whose length is greater than 80 characters, divide the TYPE statement into two or more TYPE statements. To divide the TYPE statement, insert a hyphen (-) at the division point. The remote TSO host interprets the hyphen as the continuation of the TYPE statement from the previous line. For example, consider the following TYPE statement:

type "sas options ('dmr comamid=tcp')" enter;

To divide the statements, change it to:

type "sas options ('dmr comamid=-" enter;
type "tcp')" enter;

Note:   Do not insert spaces around the hyphen.  [cautionend]

Chapter Contents



Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.