HP OpenVMS Systems Documentation |
HP OpenVMS DCL Dictionary
F$IDENTIFIER
Converts an alphanumeric identifier to its integer equivalent, or converts an integer identifier to its alphanumeric equivalent. An identifier is a name or number that identifies a category of users. The system uses identifiers to determine a user's access to a resource. FormatF$IDENTIFIER (identifier,conversion-type) Return ValueAn integer value if you are converting an identifier from a name to an integer. The F$IDENTIFIER function returns a string if you are converting an identifier from an integer to a name. If you specify an identifier that is not valid, the F$IDENTIFIER function returns a null string ("") (if you are converting from number to name) or a zero (if you are converting from name to number). Arguments
|
#1 |
---|
$ UIC_INT= F$IDENTIFIER("SLOANE","NAME_TO_NUMBER") $ SHOW SYMBOL UIC_INT UIC_INT = 15728665 Hex = 00F00019 Octal = 00074000031 $ UIC = F$FAO("!%U",UIC_INT) $ SHOW SYMBOL UIC UIC = [360,031] |
This example uses the F$IDENTIFIER to convert the member identifier from the UIC [MANAGERS,SLOANE] to an integer. The F$IDENTIFIER function shows that the member identifier SLOANE is equivalent to the integer 15728665. Note that you must specify the identifier SLOANE using uppercase letters.
To convert this octal number to a standard numeric user identification code (UIC), use the F$FAO function with the !%U directive. (This directive converts a longword to a UIC in named format.) In this example, the member identifier SLOANE is equivalent to the numeric UIC [360,031].
#2 |
---|
$ UIC_INT = (%O31 + (%X10000 * %O360)) $ UIC_NAME = F$IDENTIFIER(UIC_INT,"NUMBER_TO_NAME") $ SHOW SYMBOL UIC_NAME UIC_NAME = "ODONNELL" |
This example obtains the alphanumeric identifier associated with the numeric UIC [360,031]. First, you must obtain the longword integer that corresponds to the UIC [360,031]. To do this, place the member number into the low-order word. Place the group number into the high-order word. Next, use the F$IDENTIFIER function to return the named identifier associated with the integer.
Previous | Next | Contents | Index |