P1

From VSI OpenVMS Wiki
Jump to: navigation, search

P1 is a local symbol created automatically for the first parameter passed to a command procedure. Other such symbols include P2, P3, P4, P5, P6, P7, and P8.

Example

Consider the following command procedure named TEST.COM:

$ show sym P1

This will display whatever values we pass as the first parameter to the command procedure:

$ @TEST 1
 P1 = "1"
$ @TEST Hello
 P1 = "HELLO"
$ @TEST "Hello"
 P1 = "Hello"
$ @TEST
 P1 = ""

See also