Previous Page | Next Page

Sign-On Scripts

Script Rules


Syntax

For details about writing scripts, see the topic about sign-on script files in the SAS/CONNECT User's Guide.


Specifying Time

Some script statements specify time in seconds, as follows:

n SECONDS

n can be any number, including decimal fractions. SECOND is an alias for SECONDS. Here are some examples of valid time specifications:

0 SECONDS

0.25 SECONDS

1 SECOND

3.14 SECONDS


Using the WAITFOR and TYPE Statements

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 sign-on, specify the exact sequence of prompts and responses for the server.

You might test the sequence by experimenting at the server by going through the process that you want to capture in the WAITFOR and the TYPE statements. For each display at the server, choose a word from that display for the WAITFOR statement. Capture in a TYPE statement the information that you type in response to a display. Be sure to note all carriage returns or other special keys.

For example, if TSO is the server 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 machine 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 the following:

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

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

Previous Page | Next Page | Top of Page