<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic modifying logical name value using a Cobol program in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/modifying-logical-name-value-using-a-cobol-program/m-p/4835201#M36299</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;as the tittle says I am trying to modify the value of a defined logical name, I have been trying to find the solution to this and I have found on a lot of urls...&lt;/P&gt;&lt;P&gt;"Call SYS$TRNLNM to retrieve the current equivalence names, modify them, and... blahblahblah&amp;nbsp;"&lt;/P&gt;&lt;P&gt;but I cannot find how to use it to modify the value...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me, please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;</description>
    <pubDate>Thu, 21 Jul 2011 10:16:10 GMT</pubDate>
    <dc:creator>JudaSYyrkoon</dc:creator>
    <dc:date>2011-07-21T10:16:10Z</dc:date>
    <item>
      <title>modifying logical name value using a Cobol program</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/modifying-logical-name-value-using-a-cobol-program/m-p/4835201#M36299</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;as the tittle says I am trying to modify the value of a defined logical name, I have been trying to find the solution to this and I have found on a lot of urls...&lt;/P&gt;&lt;P&gt;"Call SYS$TRNLNM to retrieve the current equivalence names, modify them, and... blahblahblah&amp;nbsp;"&lt;/P&gt;&lt;P&gt;but I cannot find how to use it to modify the value...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me, please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2011 10:16:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/modifying-logical-name-value-using-a-cobol-program/m-p/4835201#M36299</guid>
      <dc:creator>JudaSYyrkoon</dc:creator>
      <dc:date>2011-07-21T10:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: modifying logical name value using a Cobol program</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/modifying-logical-name-value-using-a-cobol-program/m-p/4835231#M36300</link>
      <description>&lt;P&gt;Welcome to the OpenVMS forum!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;SYS$TRNLNM is used to translate (i.e. read) the logical names.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You would want to use SYS$CRELNM to create/modify logical names.&lt;/P&gt;&lt;P&gt;You can also use the equivalent LIB$SET_LOGICAL routine for supervisor mode logical names.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Details can be found in the the Programming Concepts manual&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://h71000.www7.hp.com/doc/82final/5841/5841pro_095.html#log_name"&gt;http://h71000.www7.hp.com/doc/82final/5841/5841pro_095.html#log_name&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Duncan&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2011 10:40:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/modifying-logical-name-value-using-a-cobol-program/m-p/4835231#M36300</guid>
      <dc:creator>Duncan Morris</dc:creator>
      <dc:date>2011-07-21T10:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: modifying logical name value using a Cobol program</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/modifying-logical-name-value-using-a-cobol-program/m-p/4835247#M36301</link>
      <description>&lt;P&gt;Duncan has it correct.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please realize as well that all the usual rules apply in regards to privs.&amp;nbsp; If the logical name is in the group or system table, the appropriate privs are required for the process.&amp;nbsp; Also, there are qualifiers to the CRELNM service to indicate the table etc that must be defined.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2011 10:55:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/modifying-logical-name-value-using-a-cobol-program/m-p/4835247#M36301</guid>
      <dc:creator>abrsvc</dc:creator>
      <dc:date>2011-07-21T10:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: modifying logical name value using a Cobol program</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/modifying-logical-name-value-using-a-cobol-program/m-p/4835487#M36302</link>
      <description>&lt;P&gt;The LIB$GET_LOGICAL﻿ routine is easier to code and call than are the sys$trnlnm and related system services, when calling from non-pointer languages. &amp;nbsp; &amp;nbsp;(Some of the lib$ calls will parallel the sys$ calls, and use APIs that are easier to access from COBOL, BASIC or older (pre-pointer) Fortran.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are various examples of calling system routines available from HP. &amp;nbsp;Some have been published, but I'd expect HP has additional examples available.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are the names of some of the old support articles for system services with APIs similar to sys$trnlnm and sys$crelnm and related, and the HP support center folks may (will?) be able to get you copies of these articles and other calls:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Example-COBOL Using $SNDJBCW To Enter A File In A Print Queue&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Example-COBOL Using $SNDJBCW To Start And Stop A Batch Queue&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Example-COBOL Using $SNDJBCW To Submit A Batch Job With Parameters&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Example-COBOL Using SYS$SNDJBCW To Alter A Print Queue&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Example-COBOL Putting &amp;gt;1 Wildcard Files Into Single Print Job&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Published COBOL examples include these:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://h71000.www7.hp.com/wizard/wiz_1091.html"&gt;http://h71000.www7.hp.com/wizard/wiz_1091.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://h71000.www7.hp.com/wizard/wiz_8309.html"&gt;http://h71000.www7.hp.com/wizard/wiz_8309.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://h71000.www7.hp.com/wizard/wiz_3061.html"&gt;http://h71000.www7.hp.com/wizard/wiz_3061.html&lt;/A&gt;﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The lib$set_symbol call in that second example is comparatively similar to the lib$set_logical call.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You will not find examples of everything posted, so (in general) you will need to learn the argument-passing rules from COBOL applications for some of the core system service calls (which do have examples in the COBOL manuals or posted at HP), and then generalize and work outward from there.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2011 13:44:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/modifying-logical-name-value-using-a-cobol-program/m-p/4835487#M36302</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2011-07-21T13:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: modifying logical name value using a Cobol program</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/modifying-logical-name-value-using-a-cobol-program/m-p/4836005#M36304</link>
      <description>&lt;DIV&gt;&lt;DIV&gt;&lt;P&gt;This might be helpful, too?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A target="_blank" href="http://vouters.dyndns.org/tima/"&gt;http://vouters.dyndns.org/tima/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It looks like some of the example programs that were available from STARS/EIRS/DSN may be available at that URL from Philippe Vouters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;bob&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;﻿&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2011 20:24:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/modifying-logical-name-value-using-a-cobol-program/m-p/4836005#M36304</guid>
      <dc:creator>Bob Blunt</dc:creator>
      <dc:date>2011-07-21T20:24:21Z</dc:date>
    </item>
    <item>
      <title>Re: modifying logical name value using a Cobol program</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/modifying-logical-name-value-using-a-cobol-program/m-p/4836079#M36305</link>
      <description>&lt;P&gt;Juda,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; The logical name interfaces provide for "lookup" and "create" operations&amp;nbsp;only. There is no separate "modify" operation. To modify an existing logical name, just create it again. The new value will replace the old.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; SYS$TRNLNM and SYS$CRELNM are the low level interface to logical name tables. They have the broadest level of functionality, but are a bit complex to code (system service item lists are especially ugly in COBOL), and typically require privilege to do anything really useful (see belog)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; LIB$GET_LOGICAL and LIB$SET_LOGICAL are limited to the most common operations and are much simpler and obvious to code and do not require privilege for those operations which are unprivileged from DCL.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Two&amp;nbsp;words of warning...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1)&amp;nbsp;Logical names are case sensitive and can be mixed case. It's relatively uncommon to see mixed case logical names since DCL automatically upcases unquoted parameters. When using the system service or LIBRTL interface it's easy to inadvertently define a mixed or lower case logical name and then be confused as to why it's&amp;nbsp;apparently not used&amp;nbsp;from DCL. Before V4.0 it wasn't possible to access lower case logical names from DCL at all!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) "Normal" logical names defined from DCL are SUPERVISOR mode. Your code runs in USER mode. Logical names in the process table defined in USER mode are automatically DEASSIGNED at image exit. If you code a call to $CRELNM to define a process&amp;nbsp;logical name from a user mode program it will succeed, and the logical name will exist for the duration of that image, but&amp;nbsp;will be deleted when you exit to DCL. This&amp;nbsp;can be&amp;nbsp;very confusing! What's worse, even if you specify mode PSL$C_SUPER to $CRELNM, it will be maximised against your current mode (PSL$C_USER), which means it's silently changed back&amp;nbsp;to USER, and again your logical name is deleted at image exit. You need SYSNAM privilege to override this behaviour and define a SUPERVISOR mode logical name from a USER mode program.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LIB$SET_LOGICAL has a kind of special dispensation&amp;nbsp;to define SUPERVISOR mode logical names on behalf of USER mode processes.&amp;nbsp;If you want to manipulate logical names which will persist beyond the execution of your image, you should use LIB$SET_LOGICAL to define them. (but, that means LIB$SET_LOGICAL only works from processes which a CLI, thus not&amp;nbsp;in a detached process without a CLI).&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jul 2011 22:04:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/modifying-logical-name-value-using-a-cobol-program/m-p/4836079#M36305</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2011-07-21T22:04:26Z</dc:date>
    </item>
    <item>
      <title>Re: modifying logical name value using a Cobol program</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/modifying-logical-name-value-using-a-cobol-program/m-p/5287383#M36306</link>
      <description>&lt;P&gt;Here are some snippets: -&lt;BR /&gt;*&lt;BR /&gt;01&amp;nbsp; lnm_mbx_list.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 03&amp;nbsp; item_string.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 05&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pic s9(4)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; comp&amp;nbsp;&amp;nbsp;&amp;nbsp; value&amp;nbsp;&amp;nbsp; 10.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 05&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pic s9(4)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; comp&amp;nbsp;&amp;nbsp;&amp;nbsp; value&amp;nbsp;&amp;nbsp; external&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lnm$_string.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 05&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pointer value&amp;nbsp;&amp;nbsp; reference&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; lnm_system.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 05&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pic s9(9)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; comp.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 03&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pic s9(9)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; comp.&lt;BR /&gt;01&amp;nbsp; lnm_system&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pic x(10)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; value&amp;nbsp;&amp;nbsp; "LNM$SYSTEM".&lt;BR /&gt;*&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; call "sys$crelnm"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; using&amp;nbsp;&amp;nbsp; by value 0&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; by descriptor "LNM$PROCESS_DIRECTORY", "LNM$TEMPORARY_MAILBOX"&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; by value 0&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; by reference&amp;nbsp; lnm_mbx_list&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; giving&amp;nbsp; sys_status.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if sys_status not = ss$_normal and ss$_supersede&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; call "lib$stop" using by value sys_status.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2011 10:04:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/modifying-logical-name-value-using-a-cobol-program/m-p/5287383#M36306</guid>
      <dc:creator>Richard J Maher</dc:creator>
      <dc:date>2011-08-01T10:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: modifying logical name value using a Cobol program</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/modifying-logical-name-value-using-a-cobol-program/m-p/5287435#M36307</link>
      <description>&lt;P&gt;Richard:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Shouldn't the statement:&amp;nbsp; "if sys_status not = ss$_normal and ss$_supersede&amp;nbsp;"&amp;nbsp; actually be "OR".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the case of creating the logical name that does not exist, the SS$_SUPERCEDE will not be returned.&amp;nbsp; Only on subsequent logical name updates.&amp;nbsp; For you sepcific example, the code will work as described.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2011 10:44:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/modifying-logical-name-value-using-a-cobol-program/m-p/5287435#M36307</guid>
      <dc:creator>abrsvc</dc:creator>
      <dc:date>2011-08-01T10:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: modifying logical name value using a Cobol program</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/modifying-logical-name-value-using-a-cobol-program/m-p/5287559#M36308</link>
      <description>&lt;P&gt;I'd implement a low-bit test there, given that the code shown is only testing for failure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In general: Low Bit Clear (LBC) for generic error tests. &amp;nbsp; Low-bit Set (LBS) for success. &amp;nbsp;(It's also possible to process conditions by error severity, though that's not as commonly needed nor implemented.﻿)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The low-bit test can simplify and clarify the code, and the intent of the programmer, and it would also correctly process any other condition values that might also happen to be returned.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While it's unlikely that this OpenVMS routine will see additional condition codes added, there's no extra cost in correctly contending with that possibility here using LBS or LBC testing. &amp;nbsp;(And who knows, there may be a corner case within the existing code that kicks back an undocumented successful/LBS or error/LBC code, too.)&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2011 11:23:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/modifying-logical-name-value-using-a-cobol-program/m-p/5287559#M36308</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2011-08-01T11:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: modifying logical name value using a Cobol program</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/modifying-logical-name-value-using-a-cobol-program/m-p/5287591#M36309</link>
      <description>&lt;P&gt;@abrsvc: You're wrong or you misunderstand the COBOL condition check. The NOT mandating the AND. (It's always not going to be equal to one of them so and OR wouldn't be much use.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;@steve: But you would say that wouldn't you; and have done on countless occasions. I certainly use the BLBx convention when coding MACRO-32 and don't really have a problem with it in HLLs but (for readability and deterministic[ability?]) it never hurts to be explicit. There are also many occasions when one would like to branch logic around whether or not the logical already existed (or whether a string was truncated or any other alternate success status)&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2011 11:50:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/modifying-logical-name-value-using-a-cobol-program/m-p/5287591#M36309</guid>
      <dc:creator>Richard J Maher</dc:creator>
      <dc:date>2011-08-01T11:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: modifying logical name value using a Cobol program</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/modifying-logical-name-value-using-a-cobol-program/m-p/5288311#M36310</link>
      <description>&lt;P&gt;&amp;nbsp;Richard,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Your code is certainly correct, and will do what you intend, but the resulting logical name will be&amp;nbsp;USER mode. Since in your case,&amp;nbsp;the logical name is defined&amp;nbsp;in LNM$PROCESS_DIRECTORY, it will survive image run down. But, if the code&amp;nbsp;were modified for the more common usage of logical names, defined in the LNM$PROCESS table, the logical name&amp;nbsp;would be deleted at image run down, which is probably not what is intended and can be very confusing to debug.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd guess that since you're redirecting temporary mailboxes to the system table (interesting concept...) you must have fairly high privilege, which you could use to override user mode.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wouldn't it be much simpler to say:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;  CALL "LIB$SET_LOGICAL"
  USING
   BY DESCRIPTOR "LNM$TEMPORARY_MAILBOX", "LNM$SYSTEM", "LNM$PROCESS_DIRECTORY"
  GIVING sys_status.&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Of course,&amp;nbsp;it would be&amp;nbsp;more interesting&amp;nbsp;go the other way and use SYS$CMEXEC to&amp;nbsp;get the logical name defined in SUPER mode, but maybe not a good recommendation for Juda.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm also curious about your status check. You're saying that in Cobol the expression:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; sys_status not = ss$_normal and ss$_supersede&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is equivalent to:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; (sys_status not = ss$_normal) and (sys_status not = ss$_supersede)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;rather than:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; sys_status not = (ss$_normal and ss$_supersede)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can see why many folk would find that confusing. Cobol has some rather unique syntax.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;﻿﻿&lt;/P&gt;</description>
      <pubDate>Mon, 01 Aug 2011 23:02:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/modifying-logical-name-value-using-a-cobol-program/m-p/5288311#M36310</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2011-08-01T23:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: modifying logical name value using a Cobol program</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/modifying-logical-name-value-using-a-cobol-program/m-p/5288727#M36311</link>
      <description>&lt;P&gt;&amp;gt;COBOL has some rather unique syntax.﻿&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes.&amp;nbsp; :-)&amp;nbsp; You also have level 88s where you can test a variable for a whole list of values and ranges.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Aug 2011 09:49:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/modifying-logical-name-value-using-a-cobol-program/m-p/5288727#M36311</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-08-02T09:49:52Z</dc:date>
    </item>
  </channel>
</rss>

