Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Input of parameters for the main function

&pagelevel(4)&pagelevel

Input data that is in the parameter line but does not serve to redirect the standard I/O files (see "Redirecting standard I/O files)") is passed to the main function as parameters (i.e. actual arguments). In the program, these parameters can be processed as strings that are terminated with the null byte (\0).

In the explanation given below, the dummy parameters in italics must be replaced by currently applicable values:

%pattern

All file names that correspond to the specified pattern are passed as parameters.

pattern is a fully or partially qualified file name with wildcard syntax.

For compatibility reasons, further parameters can also be specified in order to control which files are selected, e.g.:

  • file and catalog attributes (FCBTYPE, SHARE, etc.)

  • creation and access date (CRDATE, EXDATE, etc.)

These parameters must be specified in the syntax of the ISP command FSTAT.

For example, the following specification supplies the names of all files that were created today with the suffix .C.

%*.c,cr=t

other-parameters

Other parameters are passed to the program directly. Quotes within a parameter build a string. Whitespace characters and the backslash at the end of the line are treated as delimiters between two parameters, except when they are inside a string.

A string ('string' or "string") is delimited by a matching pair of quotes and may contain any characters, including whitespace characters. These characters are passed to the program without the delimiting quotes (’ or "). If the single or double quote that is used as a delimiter appears in the string, it must be preceded by a backslash (\). For example: ’\’quotation\’’ or "\"quotation\"".

The end-of-line character (\n) can also be passed to the program by terminating the line (with a backslash) within the string and entering any further characters as well as the closing quote in the continuation line. For example:
’Part 1\
Part 2’

If characters with a special meaning when passing parameters (e.g. % or >) are to be transferred to the program, they must be preceded by a backslash. In such a case, the backslash is removed, and the character itself is transferred. This method can also be used to cancel the special meaning of the backslash. Thus, \\ stands for a backslash without special meaning.

To enable the transfer of lowercase letters via procedure parameters, any uppercase letter that is preceded by a backslash is converted to the corresponding lowercase letter.

Effect of the backslash (summary):

\letter

The letter is passed as a lowercase letter. This makes it possible to pass lowercase letters even in cases where the BS2000 command interpreter automatically converts lowercase into uppercase (e.g. in procedure parameters).

\end-of-line

Backslash immediately followed by end-of-line.

Outside quoted strings, the backslash is interpreted as a delimiter between two parameters. Consequently, additional parameters can be entered in continuation lines.

Within quoted strings, the end-of-line loses its special meaning and is passed to the program as an end-of-line character (\n).

\other-character

The backslash is removed, and the other-character is passed. This method can be used to cancel the special meaning of specific characters.

Examples

Input:                 Passed parameters:
\AB\C                  "aBc"
%exp.                  All file names with the prefix EXP.
'string with \         "string with \nnewline"
newline'
str"ing with space"    "string with space"