Difference between revisions of "GETENV()"

From Lianjapedia
Jump to: navigation, search
 
(Description)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Function to get environment information
 
Function to get environment information
 
  
 
==Syntax==
 
==Syntax==
GETENV(<expC>)
+
GETENV(<expC> [,<cDefault>] )
 
+
  
 
==See Also==
 
==See Also==
[[ACCESS()]], [[ADDBS()]], [[GETGID()]], [[GETLOG()]], [[GETPID()]], [[GETUID()]], [[HOME()]], [[:Category:Printing|Printing]], [[PUTENV()]], [[PUTLOG()]]
+
[[ACCESS()]], [[ADDBS()]], [[GETGID()]], [[GETPID()]], [[GETUID()]], [[HOME()]], [[PUTENV()]]
 
+
  
 
==Description==
 
==Description==
The GETENV() function returns the value of the environment variable <expC>. Its main purpose is to pass information into Recital (e.g. from DCL command procedures, or UNIX/Linux shell scripts).  In UNIX, Linux and Windows it returns the value of an environment variable.  In OpenVMS, it returns the value of a DCL symbol.
+
The GETENV() function returns the value of the environment variable <expC>. If the environment variable does not exist then the default <cDefault> is returned.
 
+
  
 
==Example==
 
==Example==
 
<code lang="recital">
 
<code lang="recital">
? getenv("APP_FILE")
+
? getenv("DB_DATADIR")
/usr/recital/patrons.dbf
+
C:\lianja\data\
 
</code>
 
</code>
  
 
==Products==
 
Recital Server, Recital
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
[[Category:Environment]]
 
 
[[Category:Environment Functions]]
 
[[Category:Environment Functions]]

Latest revision as of 03:58, 10 February 2023

Purpose

Function to get environment information

Syntax

GETENV(<expC> [,<cDefault>] )

See Also

ACCESS(), ADDBS(), GETGID(), GETPID(), GETUID(), HOME(), PUTENV()

Description

The GETENV() function returns the value of the environment variable <expC>. If the environment variable does not exist then the default <cDefault> is returned.

Example

? getenv("DB_DATADIR")
C:\lianja\data\