F$MULTIPATH()
F$MULTIPATH is a lexical function that returns a specified item of information for a specific multipath-capable device (valid on Alpha and Integrity server systems only).
Syntax
F$MULTIPATH(device-name,item,context-symbol)
Return Value
A character string containing the requested information.
Arguments
device-name
Specifies a physical device name or a logical name equated to a physical device name. Specify the device name as a character string expression. After the device-name argument is evaluated, the F$MULTIPATH function examines the first character of the name. If the first character is an underscore (_), the name is considered a physical device name; otherwise, a single level of logical name translation is performed and the equivalence name, if any, is used.
item
Specifies the type of device information to be returned. The item argument must be specified as a character string expression. Currently, the only valid item is MP_PATHNAME, which returns a string with the path name for the specified multipath-capable device.
context-symbol
Prior to the first use of F$MULTIPATH with MP_PATHNAME, the context symbol must be initialized to a value of 0. The F$MULTIPATH function is responsible for maintaining the value of the context symbol. CAUTION Do not modify the context symbol value after it has been initialized to 0; doing so could result in unpredictable behavior of F$MULTIPATH.
Examples
$ XYZ = 0 $ $LOOP: $ PATH = F$MULTIPATH( "$1$DGA12", "MP_PATHNAME", XYZ ) $ IF PATH .EQS. "" THEN GOTO EXIT $ WRITE SYS$OUTPUT "PATH NAME = ''PATH'" $ GOTO LOOP $ $EXIT: $ EXIT
This example shows the use of F$MULTIPATH with the MP_ PATHNAME item code. Note that the context symbol XYZ has been initialized to 0 outside of the loop. The output from this command procedure is shown below:
path name = PGA0.5000-1FE1-0001-5782 path name = PGA0.5000-1FE1-0001-5783 path name = PGA0.5000-1FE1-0001-5781 path name = PGA0.5000-1FE1-0001-5784 path name = MSCP
When all paths for a given multipath device have been returned, the end of the list is signaled by the return of a blank path name.