Script Language Components

Script language is composed of "commands" and "values." Commands are words that have special meaning in script language. Values are pieces of data in the form of variables, strings, numbers, or file names. A "statement"  is an instruction that performs an action; it has at least one command, and some statements have parameters. A "parameter" is the object of the statement and may be a keyword, a value, or a combination of keywords and values. You can sometimes think of statements as having verbs and objects. For example, in the statement GET _author, GET is the verb (command) and _author is the object (parameter).

The components and conventions used to describe the STN script language are:

  1. Commands and keywords are shown in uppercase letters, e.g., EXIT and SECONDS.

  2. Strings are shown in lowercase letters inside double quotation marks. For example, in the statement SEND "string", SEND is a command, and string is a string value. You may use a variable wherever you can use a string.

  3. Variables are shown in lowercase letters with a preceding underscore. For example, in GET _var1, GET is a command and _var1 represents the name of a variable.

  4. Operators are shown in uppercase letters, e.g., AND.

  5. Labels are preceded by an @ character and identify a location in a script so that other statements can refer to that location.

  6. Numbers are denoted by lowercase letters. For example, in the statement PAUSE n, n represents a number.

  7. Optional parameters are shown inside square brackets. For example, PAUSE n [SECONDS] means the PAUSE statement has a required parameter, n, and an optional keyword, SECONDS. Do not type the brackets when you type the parameter or keyword.

  8. When there is a choice of parameters or values, the choices are enclosed in braces, and a vertical bar separates the choices. For example, in the statement CAPTURE {ON | OFF}, the keyword ON or the keyword OFF follows the CAPTURE command.

  9. File names are shown within angle brackets. For example, DELETE <file name>. You may use a variable whose value is a file name wherever you can use a file name.

  10. Comments are preceded by \* and continue through the ends of their lines. The script processor ignores comments.

  11. Example scripts and statements are shown in a fixed-width font.

  12. Script output and results are shown in a bold font.

Note that a block is either a single statement or a group of statements enclosed by BEGIN and END.

See Script Syntax Requirements for additional information on organizing scripts and writing statements.

Learn More

Creating a Script