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
Copied!
"directory" is the execution directory of the command-line program, i.e. the current working directory when the program was executed. Note that Gliimly 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.