Path: news.mitre.org!blanket.mitre.org!philabs!newsjunkie.ans.net!newsfeeds.ans.net!news-was.dfn.de!news-fra1.dfn.de!Cabal.CESspool!bofh.vszbr.cz!newscore.univie.ac.at!newsfeed.Austria.EU.net!nntp.magwien.gv.at!usenet From: Ferry Bolhar-Nordenkampf Newsgroups: vmsnet.internals,comp.os.vms Subject: Re: Alpha environmental variables Date: Tue, 25 Nov 1997 17:36:15 +0100 Organization: Magistrat der Stadt Wien MA-14 Lines: 40 Message-ID: <347AFE7F.6231@adv.magwien.gv.at> References: <01IQEDS49QBA96WPY8@accuwx.com> NNTP-Posting-Host: marmeladinger.adv.magwien.gv.at Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Mozilla 3.0 (X11; I; OSF1 V4.0 alpha) To: "Jess C. Goodman" Xref: news.mitre.org vmsnet.internals:5394 comp.os.vms:183848 Jess C. Goodman wrote: > > According to the Alpha AXP Architecture Reference Manual 2nd edition > (Part III chapter 2) it should be possible to write a program to > show/set/save the console environmental variables on a running VMS > system. The program would use the GET_ENV/SET_ENV/SAVE_ENV Console > Callback Routines which are dispatched to through the Console Routine > Block. There are two undocumented system services (SYS$GETENV and SYS$SETENV) to access console variables. You can only access predefined variables with these services. Both services have one argument, the address of an item list containing special item_3 descriptors. Every descriptor contains the item value of the requested variable (a longword), the length of the working storage (longword), a pointer to working storage containing or receiving the variable's value (a quadword), and a pointer to a longword holding the actual length of the obtained value (quadword). The module $STENVDEF contains a list of all known item codes as well as a descriptor offset definition. You need no privs to obtain values, but you need CMKRNL priv to set or change values. There is an undocumented lexical function as well: F$GETENV allows you read-only access to environment variables from DCL level. > Has anybody written a program that does this? (Or would somebody enjoy > writing one?) I don't have an Alpha system I can afford to crash too > often in developing such a program. I don't have a Macro 64 assembler > either. There is no need for a MACRO-64 compiler - you can use these services from any HLL which allows the usage of VMS item lists. Greetings, Ferry -- Ing. Ferry Bolhár-Nordenkampf Magistrat der Stadt Wien (MA-14) A - 1010 Vienna (Austria) Phone: +43 1 4000 98632 E-Mail: bol@adv.magwien.gv.at "Wenn hier einer schuld ist, dann immer nur der Computer."