Environment Variable Import

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
bobyon
Premium Member
Premium Member
Posts: 200
Joined: Tue Mar 02, 2004 10:25 am
Location: Salisbury, NC

Environment Variable Import

Post by bobyon »

I'm working on developing a routine (script) for setting environment variables. I know there are the dsadmin commands of envadd, envset and envdelete. I also find now that export and import are available via the DS Administrator GUI.

Has anyone found a way to initiate the import from a command line?

The dsadmin commands also don't seem to provide the ability to add/update the variable description. Is there an option for setting the description?

Thanks,
Bob
Bob
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I haven't looked around for a command line method, but if you are moving ALL of the environment settings from one project (or machine) to another, you could copy the "DSParams" file in its entirety.
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

We do some scripted "sed" find/replace commands on the DSParams file for certain settings that cannot be changed via the dsadmin command. The same could be done for inserting env vars rather than importing via dsadmin.
Choose a job you love, and you will never have to work a day in your life. - Confucius
bobyon
Premium Member
Premium Member
Posts: 200
Joined: Tue Mar 02, 2004 10:25 am
Location: Salisbury, NC

Post by bobyon »

Mostly this will be used to add new environment variables.
Bob
FranklinE
Premium Member
Premium Member
Posts: 739
Joined: Tue Nov 25, 2008 2:19 pm
Location: Malvern, PA

Post by FranklinE »

You need a good Unix script writer. We have a ksh script to import environment variables. The command line is documented, so mostly you need to set your Unix environment.

We use a ssi file to keep all environment variables. Updating them or adding new ones is as simple as editing the ssi file and running the script.
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson

Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
rkashyap
Premium Member
Premium Member
Posts: 532
Joined: Fri Dec 02, 2011 12:02 pm
Location: Richmond VA

Post by rkashyap »

Note that IBM InfoSphere Information Server, Version 11.3.1.1 (Fix Pack 1) has a patch for a setenv issue. This issue can (once in a while) corrupt dsParams file.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

FranklinE wrote:We use a ssi file to keep all environment variables.
Forgot that this was something I wanted to ask about - "ssi file"? All my searches turn up is a flood of Social Security Income references. Guessing that's not what you meant. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
FranklinE
Premium Member
Premium Member
Posts: 739
Joined: Tue Nov 25, 2008 2:19 pm
Location: Malvern, PA

Post by FranklinE »

I forget what the acronym is supposed to represent. What I know is there's a standard path that ends with etc/ssi/ in which these files with extension .ssi are kept. They are text files with bunches of variables relevant to the process being run. They are sourced in at runtime.

Our DS ssi files contain all project-specific environment settings, such as default paths (/data, /cm, etc.) and settings for sys-level (dev, sat, etc.) that are determined at runtime as well. We parameterize just about everything, and the ssi file keeps us sane.

Edit: search on "unix ssi". It stands for "server side includes". 8)
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson

Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Awesome, thanks Franklin.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

So CSI means "client side includes". I wonder if the makers of the TV series are aware of that?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
FranklinE
Premium Member
Premium Member
Posts: 739
Joined: Tue Nov 25, 2008 2:19 pm
Location: Malvern, PA

Post by FranklinE »

I always ask my server if the sides are included.
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson

Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Do you want fries with that? :D
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply