Progress
Language Reference


OS-GETENV Function

Interfaces
OS
SpeedScript
All
All
Yes

Returns a string that contains the value of the desired environment variable in the environment in which Progress is running.

SYNTAX

OS-GETENV ( environment-variable ) 

environment-variable

The name of the environment variable whose value you want to find.

EXAMPLE

This procedure prompts a user for a report name. It then builds the full pathname where the report will be stored, using OS-GETENV to find the DLC directory. Finally, the procedure displays the full pathname.

r-os-env.p
DEFINE VARIABLE pathname AS CHARACTER
  FORMAT "x(32)"
  LABEL "The report will be stored in ".
DEFINE VARIABLE report_name AS CHARACTER
  FORMAT "x(32)"
  LABEL "Please enter report name." .

UPDATE report_name.
pathname = OS-GETENV("DLC") + "/" + report_name.
DISPLAY pathname WITH FRAME b SIDE-LABELS. 

NOTES


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095