VMS Help  —  Lexicals
function with a context type of PROCESS or by a call to the F$PID function, the string returned is PROCESS_CONTEXT. A symbol retains this type until F$CONTEXT is called with the symbol and the CANCEL keyword, or until a null string ("") is returned by a call to F$PID. Similarly, the return value is the string CLUSTER_SYSTEM_CONTEXT for symbols created by the F$CSID function. If the symbol is a context symbol, then the return value will be one of the types shown in the following table. Symbol Type Lexical Creating Symbol PROCESS_CONTEXT F$PID or F$CONTEXT (with PROCESS context type) CLUSTER_SYSTEM_ F$CSID CONTEXT The string STRING is returned if the symbol is equated to a character string whose characters do not form a valid integer or whose type is not a context. If the symbol is undefined, a null string is returned.

42.2  –  Argument

 symbol-name

    Specifies the name of the symbol to be evaluated.

42.3  –  Examples

    1.$ NUM = "52"
      $ TYPE = F$TYPE(NUM)
      $ SHOW SYMBOL TYPE
        TYPE = "INTEGER"

      This example uses the F$TYPE function to determine the data
      type of the symbol NUM. NUM is equated to the character
      string "52". Because the characters in the string form a valid
      integer, the F$TYPE function returns the string INTEGER.

    2.$ NUM = 52
      $ TYPE = F$TYPE(NUM)
      $ SHOW SYMBOL TYPE
        TYPE = "INTEGER"

      In this example, the symbol NUM is equated to the integer 52.
      The F$TYPE function shows that the symbol has an integer data
      type.

    3.$ CHAR = "FIVE"
      $ TYPE = F$TYPE(CHAR)
      $ SHOW SYMBOL TYPE
        TYPE = "STRING"

      In this example, the symbol CHAR is equated to the character
      string FIVE. Because the characters in this string do not form
      a valid integer, the F$TYPE function shows that the symbol has
      a string value.

    4.$ x = F$CONTEXT("PROCESS",CTX,"USERNAME","SMITH")
      $ TYPE = F$TYPE(CTX)
      $ SHOW SYMBOL TYPE
        TYPE = "PROCESS_CONTEXT"
      $ x = F$CONTEXT("PROCESS",CTX,"CANCEL")
      $ TYPE = F$TYPE(CTX)
      $ SHOW SYMBOL TYPE
        TYPE = ""

      In this example, the F$TYPE function returns the string
      PROCESS_CONTEXT because the symbol has been produced by a call
      to the F$CONTEXT function with a context type of PROCESS. The
      symbol returns this type until F$CONTEXT is called with the
      symbol and the selection-item argument value CANCEL.

43  –  F$UNIQUE

    Valid on Alpha and Integrity server systems only.

    Generates a string that is suitable to be a file name and is
    guaranteed to be unique across the cluster. Unique file names can
    be useful when creating temporary files.  The string returned
    is alphanumeric and may be used as a file name, logical name,
    or DCL symbol name or value with no reserved character issues.

    The F$UNIQUE function has no arguments, but must be followed by a
    blank pair of parentheses.

    Format

      F$UNIQUE()

43.1  –  Return Value

    A character string containing the unique string.

43.2  –  Examples

    1.$ WRITE SYS$OUTPUT F$UNIQUE()
      414853555241159711D7DF797CCF573F
      $
      $ WRITE SYS$OUTPUT F$UNIQUE()
      414853555241509811D7DF797E3F2777
      $

      This example shows how a unique string is returned on
      subsequent WRITE commands.

    2.$ OPEN/WRITE TEMP_FILE 'F$UNIQUE()
      $ DIRECTORY

      Directory WORK1:[TEST]

      594B53554C421C9C11D75463D61F58B7.DAT;1

      Total of 1 file.
      $
      $ CLOSE/DISPOSITION=DELETE TEMP_FILE
      $ DIRECTORY
      %DIRECT-W-NOFILES, no files found
      $

      The first command creates a temporary file and gives it a
      unique name, which is displayed by the subsequent DIRECTORY
      command. After the file is later closed and deleted, it no
      longer shows up in the directory.

44  –  F$USER

    Returns the current user identification code (UIC) in named
    format as a character string. The F$USER function has no
    arguments, but must be followed by parentheses.

    Format

      F$USER()

44.1  –  Return Value

    A character string containing the current UIC, including brackets
    ([ ]).  The UIC is returned in the format [group-identifier,
    member-identifier].

44.2  –  Example

  $ UIC = F$USER()
  $ SHOW SYMBOL UIC
    UIC = "[GROUP6,JENNIFER]"

      In this example, the F$USER function returns the current user
      identification code and assigns it to the symbol UIC.

45  –  F$VERIFY

    Returns an integer value indicating whether the procedure
    verification setting is currently on or off. If used with
    arguments, the F$VERIFY function can turn the procedure and image
    verification settings on or off. You must include the parentheses
    after the F$VERIFY function whether or not you specify arguments.

    Format

      F$VERIFY([procedure-value] [,image-value])

45.1  –  Return Value

    The integer 0 if the procedure verification setting is off, or
    the integer 1 if the procedure verification setting is on.

45.2  –  Arguments

 procedure-value

    Specifies an integer expression with a value of 1 to turn
    procedure verification on, or a value of 0 to turn procedure
    verification off.

    When procedure verification is on, each DCL command line in the
    command procedure is displayed on the output device. Procedure
    verification allows you to verify that each command is executing
    correctly.

    If you use the procedure-value argument, the function first
    returns the current procedure verification setting. Then the
    command interpreter turns the procedure verification on or off,
    as specified by the argument.

 image-value

    Specifies an integer expression with a value of 1 to turn image
    verification on, or a value of 0 to turn image verification off.

    When image verification is on, data lines in the command
    procedure are displayed on the output device.

45.3  –  Examples

    1.$ SAVE_PROC_VERIFY = F$ENVIRONMENT("VERIFY_PROCEDURE")
      $ SAVE_IMAGE_VERIFY = F$ENVIRONMENT("VERIFY_IMAGE")
      $ SET NOVERIFY
         .
         .
         .
      $ TEMP = F$VERIFY(SAVE_PROC_VERIFY, SAVE_IMAGE_VERIFY)

      This example shows an excerpt from a command procedure. The
      first assignment statement assigns the current procedure
      verification setting to the symbol SAVE_PROC_VERIFY. The second
      assignment statement assigns the current image verification
      setting to the symbol SAVE_IMAGE_VERIFY.

      Then, the SET NOVERIFY command disables procedure and image
      verification. Later, the F$VERIFY function resets the
      verification settings, using the original values (equated to
      the symbols SAVE_PROC_VERIFY and SAVE_IMAGE_VERIFY). The symbol
      TEMP contains the procedure verification before it is changed
      with the F$VERIFY function. (In this example, the value of TEMP
      is not used.)

    2.$ VERIFY = F$VERIFY(0)
         .
         .
         .
       $ IF VERIFY .EQ. 1 THEN SET VERIFY

      This example shows an excerpt from a command procedure that
      uses the F$VERIFY function to save the current procedure
      verification setting and to turn both procedure and image
      verification off. At the end of the command procedure, if
      procedure verification was originally on, both the procedure
      and image verification are turned on.
Close Help