× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



thanks to burce and james, it was good help.

> ----------
> From:         James Rich[SMTP:james@eaerich.com]
> Reply To:     c400-l@midrange.com
> Sent:         Saturday, April 13, 2002 1:37 AM
> To:   c400-l@midrange.com
> Subject:      Re: [C400-L] Environment Variables
>
> On Fri, 12 Apr 2002, Srikanth_D wrote:
>
> > hi all,
> >
> > while going through a sample program i came across the function
> putenv();. i
> > would like to know whether any environment variables will be set before
> my
> > program is launched, if yes how can i find out a list of them.
>
> There are typically several environment variables set.  You can ignore all
> of them unless you have a specific reason to use them.  Some common ones
> are the current directory, your username, the hostname, and your path.
> These may not be set on OS/400.
>
> > i have another doubt, since environment variables are like name=value
> why
> > can't we simply use program variables (maybe global variables). it will
> be
> > great if somebody can tell me an exact scenario to use an environment
> > variable.
>
> Environment variables are not to be used as program variables.  A typical
> environment variable use is to set preferences for an application.  For
> example, you could use an environment variable to allow the user to select
> their favorite way of displaying dates.  Suppose the user sets an
> environment variable called DATE_FORMAT to have the value '*iso'.  Your
> program could check for the existence of this environment variable and if
> it is defined use the value to change your dates to display in *iso
> format.
>
> An extreme example of environment variable use is in CGI programming.  The
> web server passes all data to a CGI program using environment variables.
> The CGI program then looks for these environment variables and acts
> according to the values they have.
>
> James Rich
> james@eaerich.com
>
> _______________________________________________
> This is the C programming iSeries / AS400 (C400-L) mailing list
> To post a message email: C400-L@midrange.com
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/cgi-bin/listinfo/c400-l
> or email: C400-L-request@midrange.com
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/c400-l.
>
**************************************************************************
This email (including any attachments) is intended for the sole use of the
intended recipient/s and may contain material that is CONFIDENTIAL AND
PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or
distribution or forwarding of any or all of the contents in this message is
STRICTLY PROHIBITED. If you are not the intended recipient, please contact
the sender by email and delete all copies; your cooperation in this regard
is appreciated.
**************************************************************************


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.