| GOLF(2gg) | Development | GOLF(2gg) |
NAME¶
get-sys - (system-information)
PURPOSE¶
Obtain data that describes the system.
SYNTAX¶
get-sys \
environment <var name> \
directory | os-name | os-version \
to <variable>
DESCRIPTION¶
System-describing variables can be obtained with get-sys statement and the result stored into <variable>. The following system variables can be obtained:
• "environment" returns the name of a
given environment variable <var name>. If this is a server program, then
the environment passed from a remote caller (such as web proxy) is queried. If
this is a command-line program, then the environment from the Operating
System is queried. In the following example,the QUERY_STRING variable (i.e.
the actual query string from URL) is obtained:
get-sys environment "QUERY_STRING" to qstr
• "directory" is the execution directory
of the command-line program, i.e. the current working directory when
the program was executed. Note that Golf will change the current working
directory immediately afterwards to the application home directory (see
directories). You can use this clause to work with files in the
directory where the program was started. If your program runs as a
service, then "directory" clause always returns application
home directory, regardless of which directory mgrg program manager
started your application from.
• "os-name" is the name of Operating
System.
• "os-version" is the version of
Operating System.
EXAMPLES¶
Get the name of the Operating System
get-sys os-name to os_name
SEE ALSO¶
System information
get-sys See all documentation
| $VERSION | $DATE |