9.1.3 Extended script command description format
The description format for extended script commands is as follows:
0command-name1attribute-value [...1attribute-value] [1-attribute-name1attribute-value [...1-attribute-name1attribute-value]]
-
The command name of an extended script command always begins with #-adsh_.
-
The command name is followed first by a list of attribute values and then by a list of pairs of an attribute name and an attribute value (-attribute-name attribute-value).
-
The list of attribute values cannot be omitted, and they must be specified in a predetermined order. The list of -attribute-name attribute-value pairs can be specified in any order and their specification is optional.
-
If you specify for an attribute value a character string beginning with a hyphen (-), it will be interpreted as a specification of an attribute name. To begin an attribute value with a hyphen (-), the hyphen must be escaped with a \, ", or '.
-
A hash mark (#) at the beginning of an extended script command does not indicate a comment. You must specify two hash marks in succession (##) to set a comment in an extended script command.
-
The double quotation ("), single quotation ('), and escape (\) characters can all be used.
However, in an extended script command, any \ within a character string enclosed in double quotation marks will be interpreted as an escape character, regardless of what the following character is. To specify a \ within a character string enclosed in double quotation marks, you must specify it as \\.
-
Uppercase and lowercase characters are distinguished in command-name, attribute-name, and attribute-value (in the case of reserved words).
-
You can specify the name of an environment variable for attribute-value, and the environment variable's value will be set for the attribute value before the script starts. The name of the environment variable must be enclosed in curly brackets ({ }). The name of an environment variable must not exceed 255 bytes and must be specified in the <environment variable name> format shown below in (2) Character set definitions.
-
Start the specification of an extended script command at the beginning of the line. Between the command name and the linefeed code, use the space as the delimiter between items. A parsing error will result if any non-space character is used as a delimiter.
-
A parsing error will result if you specify more than one extended script command on a line (you cannot use a command delimiter to separate multiple commands on the same line).
-
A parsing error will result if you specify an extended script command within a function.
-
A pre-execution syntax error will result if you specify an extended script command within the block of a for, while, or until statement or within a function definition.
-
You cannot specify an extended script command within an external script called with a dot (.). If you do, the extended script command will be treated as a comment.
When you specify an extended script command that spans multiple lines, the second and subsequent lines must be specified in the following format:
#-adsh1continuing-specification
-
You can specify a continuation line only at the location of a delimiter following the command name or an attribute. A continuation line cannot be specified in the middle of the command name, an attribute name, or an attribute value.
-
If a syntax error is detected in a continuation line, the line number displayed in the error message will be for the first line of the extended script command.
- Organization of this subsection
(1) Limitations
-
An extended script command must not exceed 8,191 bytes per line, including continuation lines.
-
To specify more than one attribute value, delimit them with the space or comma. A value cannot be omitted by specifying two commas in the manner of omitting positional parameters.
(2) Character set definitions
The following table defines the character sets that can be used in attribute values.
Syntactic element |
Permissible characters |
Example target |
---|---|---|
<symbolic name> |
{<alphabetic character> | <numeric character> | @ | # | _ }+ |
Job name |
<environment variable name> |
{<alphabetic character> | _}{<alphabetic character> | _ | numeric character>}* |
File environment variable definition name |
<path name> |
A character string that conforms to the path naming conventions of the OS. Because \ is treated as metacharacter (escape character), path names in Windows must be specified as in the examples below. For details about metacharacters, see 5.1.6 Metacharacters. Examples: 'C:\test' or C:\\test |
Path name |
<any character string> |
A string of any characters. Using only the following characters is recommended: {<alphabetic character> | <numeric character> | @ | # | _ }+ |
Value of an environment variable |