Difference between revisions of "F$GETENV()"

From VSI OpenVMS Wiki
Jump to: navigation, search
(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...")
 
(Added missing quote marks on arguments.)
 
Line 36: Line 36:
 
This function writes out the dump device for the system.  
 
This function writes out the dump device for the system.  
  
  $ a = f$getenv(auto_action)
+
  $ a = f$getenv("auto_action")
 
  $ show sym a
 
  $ show sym a
 
   A = "BOOT"
 
   A = "BOOT"
Line 42: Line 42:
 
In this example, the auto action is displayed.
 
In this example, the auto action is displayed.
  
  $ a = f$getenv(boot_dev)
+
  $ a = f$getenv("boot_dev")
 
  $ show sym a
 
  $ show sym a
 
   A = "SCSI 0 6 0 0 0 0 0"
 
   A = "SCSI 0 6 0 0 0 0 0"
Line 48: Line 48:
 
In this example, the boot device is displayed.
 
In this example, the boot device is displayed.
  
  $ a = f$getenv(bootdef_dev)
+
  $ a = f$getenv("bootdef_dev")
 
  $ show sym a
 
  $ show sym a
 
   A = "SCSI 0 6 0 0 0 0 0"
 
   A = "SCSI 0 6 0 0 0 0 0"
Line 54: Line 54:
 
In this example, the default boot device is displayed.
 
In this example, the default boot device is displayed.
  
  $ a = f$getenv(booted_dev)
+
  $ a = f$getenv("booted_dev")
 
  $ show sym a
 
  $ show sym a
 
   A = "SCSI 0 6 0 0 0 0 0"
 
   A = "SCSI 0 6 0 0 0 0 0"
Line 60: Line 60:
 
In this example, the current boot device is displayed.
 
In this example, the current boot device is displayed.
  
  $ a = f$getenv(boot_osflags)
+
  $ a = f$getenv("boot_osflags")
 
  $ show sym a
 
  $ show sym a
 
   A = "0"
 
   A = "0"
Line 66: Line 66:
 
In this example, the boot flags are displayed.
 
In this example, the boot flags are displayed.
  
  $ a = f$getenv(boot_reset)
+
  $ a = f$getenv("boot_reset")
 
  $ show sym a
 
  $ show sym a
 
   A = "OFF"
 
   A = "OFF"
Line 72: Line 72:
 
In this example, the status of boot reset is displayed.
 
In this example, the status of boot reset is displayed.
  
  $ a = f$getenv(enable_audit)
+
  $ a = f$getenv("enable_audit")
 
  $ show sym a
 
  $ show sym a
 
   A = "ON"
 
   A = "ON"

Latest revision as of 17:10, 9 October 2020

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.