Questiions about environment variables

0 views
Skip to first unread message

Prashanth

unread,
Aug 16, 2003, 6:20:53 AM8/16/03
to
Hello,
I am new to OS2 environment..please answer the following questions:
1>How do I display all environment variables[including user-defined
env variable] for a session on OS/2.
2>How do I get a user-defined environment variable programmatically
using C?

Thanks in advance,
Prashanth

Buddy Donnelly

unread,
Aug 18, 2003, 9:45:36 AM8/18/03
to
On Sat, 16 Aug 2003 10:20:53 UTC, ca_pra...@mindtree.com
(Prashanth) wrote:

> Hello,
> I am new to OS2 environment..please answer the following questions:
> 1>How do I display all environment variables[including user-defined
> env variable] for a session on OS/2.

At a command line:
SET|more <enter>

> 2>How do I get a user-defined environment variable programmatically
> using C?

No idea. But ask this question in comp.os.os2.programmer. (comp.os.os2
has nearly no traffic these days.)

--
Good luck,
Buddy
Buddy Donnelly <buddy.d...@verizon.net>

Lisa

unread,
Aug 20, 2003, 1:09:03 PM8/20/03
to
Prashanth wrote:

> I am new to OS2 environment..please answer the following questions:
> 1>How do I display all environment variables[including user-defined
> env variable] for a session on OS/2.

Type SET (with no parameters) at the command line.


> 2>How do I get a user-defined environment variable programmatically
> using C?

#include <stdlib.h>

char *strValue = getenv("WHATEVER_VARIABLE_YOU_WANT");


Hope that helps!

-Lisa

Reply all
Reply to author
Forward
0 new messages