HP OpenVMS Systems

ask the wizard
Content starts here

C putenv and setting DCL symbols?

» close window

The Question is:

The C function putenv doesn't seem to work on VMS.  If I do a putenv then
 immediately do a getenv on the same symbol, it's not set.  It doesn't complain
 or anything, it just doesn't set the symbol.  getenv works find otherwise.
 It's just putenv that does
n't. Is this a known problem?  Is there something else I should be using to
 create a symbol in a C program?

The Answer is :

  The putenv() call deliberately provides the UNIX behaviour, and is
  not a substitute for the use of the OpenVMS run-time library calls
  lib$set_symbol() and lib$set_logical().
  Please see topic (7951) for a discussion of the C putenv() call.
  The OpenVMS Wizard will request that the documentation of putenv()
  be clarified.

answer written or last revised on ( 23-OCT-2002 )

» close window