Are environment variables exposed to NetRexx?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Are environment variables exposed to NetRexx?

Fernando Cassia-2
Hi,

I wonder if environment variables are exposed to NetRexx.
e.g. when running a NetRexx App on Windows, I would like to obtain the
%homepath% of the host Windows system.

Preferably not having to parse disk files....

Should I use JNI?

Thanks,
FC

--
----
During times of Universal Deceit, telling the truth becomes a revolutionary
act
- George Orwell

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Are environment variables exposed to NetRexx?

Dave Woodman
They are exposed in Java via java.lang.System.getenv(String name)

So you should be able to get at them just with System.getenv...

Dave.

-----Original Message-----
From: [hidden email]
<[hidden email]> On Behalf Of Fernando Cassia
Sent: 03 February 2020 13:51
To: IBM Netrexx <[hidden email]>
Subject: [Ibm-netrexx] Are environment variables exposed to NetRexx?

Hi,

I wonder if environment variables are exposed to NetRexx.
e.g. when running a NetRexx App on Windows, I would like to obtain the
%homepath% of the host Windows system.

Preferably not having to parse disk files....

Should I use JNI?

Thanks,
FC

--
----
During times of Universal Deceit, telling the truth becomes a revolutionary
act
- George Orwell

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : https://urldefense.proofpoint.com/v2/url?u=http-3A__ibm-2Dnetrexx.215625.n3.nabble.com_&d=DwICAg&c=jf_iaSHvJObTbx-siA1ZOg&r=_6rXNpPJ1fYV-3bV1za02NiR4PUelvicfHXwtnTXpXE&m=-WnDXEZX757C3_tb50QLJcKCZbhs17y6aWWlkNTh3YY&s=K_fwkBRIWVqh6yzrwU_JAyGxEiQ188S9vsRBSgePIqg&e= 


_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Are environment variables exposed to NetRexx?

rvjansen
In reply to this post by Fernando Cassia-2
Hi Fernando,

you can just use

System.getenv(“HOME”)

or do a

System.getenv()

to get a map of variable names to values.

best regards,

René.

On 3 Feb 2020, at 14:50, Fernando Cassia <[hidden email]> wrote:

Hi,

I wonder if environment variables are exposed to NetRexx.
e.g. when running a NetRexx App on Windows, I would like to obtain the
%homepath% of the host Windows system.

Preferably not having to parse disk files....

Should I use JNI?

Thanks,
FC

--
----
During times of Universal Deceit, telling the truth becomes a revolutionary
act
- George Orwell

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/



_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Are environment variables exposed to NetRexx?

Fernando Cassia-2


On Mon, Feb 3, 2020, 13:07 René Jansen <[hidden email]> wrote:
Hi Fernando,

you can just use

System.getenv(“HOME”)

or do a

System.getenv()

to get a map of variable names to values.

best regards,

René.

Thanks, René and Dave.

I just got back to my email after a week without my desktop. 

Thanks for your helpful and timely responses. And sorry for the untimely reply. 

FC

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/