F$GETENV()

From VSI OpenVMS Wiki
Revision as of 19:38, 28 June 2019 by Darya.zelenina (talk | contribs) (Created page with "'''F$GETENV''' is a lexical function that returns the value of the specified console environment variable (valid on Alpha systems only). =Syntax= F...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

F$GETENV is a lexical function that returns the value of the specified console environment variable (valid on Alpha systems only).

Syntax

F$GETENV(itmlst)

Return Value

Returns the value of the specified console environment variable. You can modify the console environment variables when the system is in console mode. This lexical function allows you to read the contents of these variables when the system is running.

Arguments

itmlst

The defined console environment variable names are:

  • Auto_action
  • Boot_dev
  • Bootdef_dev
  • Booted_dev
  • Boot_file
  • Booted_file
  • Boot_osflags
  • Booted_osflags
  • Boot_reset
  • Dump_dev
  • Enable_audit
  • License
  • Char_set
  • Language
  • Tty_dev

Examples

$ dump_device = f$getenv("dump_dev") 
$ write sys$output "The dump device for this system is ", dump_ device 

This function writes out the dump device for the system.

$ a = f$getenv(auto_action)
$ show sym a
 A = "BOOT"

In this example, the auto action is displayed.

$ a = f$getenv(boot_dev)
$ show sym a
 A = "SCSI 0 6 0 0 0 0 0"

In this example, the boot device is displayed.

$ a = f$getenv(bootdef_dev)
$ show sym a
 A = "SCSI 0 6 0 0 0 0 0"

In this example, the default boot device is displayed.

$ a = f$getenv(booted_dev)
$ show sym a
 A = "SCSI 0 6 0 0 0 0 0"

In this example, the current boot device is displayed.

$ a = f$getenv(boot_osflags)
$ show sym a
 A = "0"

In this example, the boot flags are displayed.

$ a = f$getenv(boot_reset)
$ show sym a
 A = "OFF"

In this example, the status of boot reset is displayed.

$ a = f$getenv(enable_audit)
$ show sym a
 A = "ON"

This shows whether audit is enabled.