VMS Help CALL, Parameters *Conan The Librarian (sorry for the slow response - running on an old VAX) |
label Specifies a label of 1 to 255 alphanumeric characters that appears as the first item on a command line. A label cannot contain embedded blanks. When the CALL command is executed, control passes to the command following the specified label. The label can precede or follow the CALL statement in the current command procedure. A label in a command procedure must be terminated with a colon (:). Labels for subroutines must be unique. Labels declared in inner procedure levels are inaccessible from outer levels, as in the following example: $CALL B $A: SUBROUTINE $ B: SUBROUTINE $ ENDSUBROUTINE $ENDSUBROUTINE In this example, the label B in subroutine A is inaccessible from the outer procedure level. parameter [...] Specifies from one to eight optional parameters to pass to the command procedure. Use quotation marks (" ") to specify a null parameter. The parameters assign character string values to the symbols named P1, P2, and so on in the order of entry, to a maximum of eight. The symbols are local to the specified command procedure. Separate each parameter with one or more spaces. You can specify a parameter with a character string value containing alphanumeric or special characters, with the following restrictions: o The command interpreter converts alphabetic characters to uppercase and uses blanks to delimit each parameter. To pass a parameter that contains embedded blanks or lowercase letters, enclose the parameter in quotation marks (" "). o If the first parameter begins with a slash (/), you must enclose the parameter in quotation marks. o To pass a parameter that contains quotation marks and spaces, enclose the entire string in quotation marks and use two sets of quotation marks within the string. For example: $ CALL SUB1 "Never say ""quit""" When control transfers to SUB1, the parameter P1 is equated to the following string: Never say "quit" If a string contains quotation marks and does not contain spaces, the quotation marks are preserved in the string and the letters within the quotation marks remain in lowercase. For example: $ CALL SUB2 abc"def"ghi When control transfers to SUB2, the parameter P1 is equated to the string: ABCdefGHI To use a symbol as a parameter, enclose the symbol in single quotation marks (` ') to force symbol substitution. For example: $ NAME = "JOHNSON" $ CALL INFO 'NAME' The single quotation marks cause the value "JOHNSON" to be substituted for the symbol `NAME'. Therefore, the parameter "JOHNSON" is passed as P1 to the subroutine INFO.
|