Consultor Eletrônico



Kbase P10920: How to retrieve Operating System environment variables into Progress 4GL
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   9/16/2008
Status: Verified

GOAL:

How to retrieve Operating System environment variables into Progress 4GL

GOAL:

How OS-GETENV works

FACT(s) (Environment):

Progress 8.x
Progress 9.x
OpenEdge 10.x
All Supported Operating Systems

FIX:

Progress added the functionality of a 4GL command to get a currently set environment variable interactively in Progres 8.x.

The 4GL command is OS-GETENV. When used in 4GL it will retrieve the specified variable directly from the operating system.

This is an example code on how to do this in Version 8:

Def var shell as char.
shell = os-getenv("TERM").
Display shell.

This will also get the value for the TERM variable for use in the 4GL code with much less coding.