next up previous 216
Next: PSX_GETEUID - Gets the effective user ID
Up: Routine Descriptions
Previous: PSX_GETEGID - Gets the effective group ID


PSX_GETENV - Translate an environment variable

Description:
The routine tries to get the translation of the environment variable NAME. If it succeeds, it returns the translation in TRANS. If it fails, it sets STATUS to PSX__NOENV and reports an error.

Invocation:
CALL PSX_GETENV( NAME, TRANS, STATUS )

Arguments:

NAME = CHARACTER * ( * ) (Given)
Name of the environment variable to be translated.
TRANS = CHARACTER * ( * ) (Returned)
The translation of the environment variable.
STATUS = INTEGER (Given and Returned)
The global status.

Examples:

CALL PSX_GETENV( 'USER', TRANS, STATUS )
This will return the value of the environment variable USER, i.e. the username of the current process.

External Routines Used
cnf: cnfCreim, cnfExprt, cnfFree

References

Copyright
Copyright (C) 1991 Science & Engineering Research Council


next up previous 216
Next: PSX_GETEUID - Gets the effective user ID
Up: Routine Descriptions
Previous: PSX_GETEGID - Gets the effective group ID

PSX POSIX interface routines
Starlink User Note 121
P M Allan
A J Chipperfield
10 April 2003
E-mail:ussc@star.rl.ac.uk

Copyright © 2000 Council for the Central Laboratory of the Research Councils