<?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 Re: F$TRNLNM not returning expected strings in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/f-trnlnm-not-returning-expected-strings/m-p/4457464#M42565</link>
    <description>Hi jan&lt;BR /&gt;&lt;BR /&gt; Thanks for the welcome.  It has been several years since I've done VMS system mgmt so I may be a bit rusty in some things.&lt;BR /&gt;&lt;BR /&gt;The original define command does not use the double quotes in defining this logical.&lt;BR /&gt;&lt;BR /&gt;DEF BACK$UDT_EXCLUDE_USERS E38587, E10697, E47646&lt;BR /&gt;&lt;BR /&gt;I will take your advice and change the DEF to the full DEFINE in this procedure.  As mentioned, these were all written many years ago for a VAX/VMS V5.3 environment. (circa 1999).  There have been some updates to account for the fact that they are now running on an ALPHA V7.3-2 system. I suppose I should look at the script that uses the logical to see how they originally expected to see the list.  &lt;BR /&gt;My original post showed how the system displayed the logicals so I would suspect they wanted the user list as a list.  &lt;BR /&gt;This most likely has not worked correctly since the upgrade but has gone unnoticed until now.&lt;BR /&gt;&lt;BR /&gt;I will let you know my results.&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 10 Jul 2009 14:30:09 GMT</pubDate>
    <dc:creator>Michael Carlton</dc:creator>
    <dc:date>2009-07-10T14:30:09Z</dc:date>
    <item>
      <title>F$TRNLNM not returning expected strings</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-trnlnm-not-returning-expected-strings/m-p/4457458#M42559</link>
      <description>&lt;!--!*#--&gt;Hi all&lt;BR /&gt;&lt;BR /&gt;Need some help here.  I have a logical name that is defined with multiple strings. When I do a translation of this, it only returns the first string.&lt;BR /&gt;&lt;BR /&gt;Here is the sequence being used:&lt;BR /&gt;&lt;BR /&gt;PROTON::NC6926&amp;gt; DEF/SYSTEM BACK$UDT_EXCLUDE_USERS E38589, 10697, 47646&lt;BR /&gt;&lt;BR /&gt;PROTON::NC6926&amp;gt; Show Logical BACK$UDT_EXCLUDE_USERS&lt;BR /&gt;&lt;BR /&gt;BACK$UDT_EXCLUDE_USERS" [super] = "E10697"&lt;BR /&gt;        = "E38589"&lt;BR /&gt;        = "E47646"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;PROTON::NC6926&amp;gt; tt = F$EDIT(F$TRNLNM("BACK$UDT_EXCLUDE_USERS"),"UPCASE")&lt;BR /&gt;PROTON::NC6926&amp;gt; show sym tt&lt;BR /&gt;  TT = "E38589"&lt;BR /&gt;&lt;BR /&gt;This is in a script that WAS working at one time.  Now it does not.  &lt;BR /&gt;I have tried deassigning the name, assigning it using /exec and /system, have specified specific logical name tables and anything else I can think of.  &lt;BR /&gt;&lt;BR /&gt;I am running a V7.3-2 cluster.&lt;BR /&gt;&lt;BR /&gt;Any thoughts as to why this happens?&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;Mike Carlton&lt;BR /&gt;</description>
      <pubDate>Fri, 10 Jul 2009 12:48:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-trnlnm-not-returning-expected-strings/m-p/4457458#M42559</guid>
      <dc:creator>Michael Carlton</dc:creator>
      <dc:date>2009-07-10T12:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: F$TRNLNM not returning expected strings</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-trnlnm-not-returning-expected-strings/m-p/4457459#M42560</link>
      <description>Are you sure the user names were not inside a string "E38589,10697,47646" originally ? What you have is a search list, used for locating files.&lt;BR /&gt;Try putting the users inside a string and then&lt;BR /&gt;$ write sys$output&lt;BR /&gt;F$TRNLNM("BACK$UDT_EXCLUDE_USERS")</description>
      <pubDate>Fri, 10 Jul 2009 13:00:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-trnlnm-not-returning-expected-strings/m-p/4457459#M42560</guid>
      <dc:creator>Thomas Ritter</dc:creator>
      <dc:date>2009-07-10T13:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: F$TRNLNM not returning expected strings</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-trnlnm-not-returning-expected-strings/m-p/4457460#M42561</link>
      <description>$ help lex f$trnlnm arg&lt;BR /&gt;&lt;BR /&gt;You need to specify an INDEX.</description>
      <pubDate>Fri, 10 Jul 2009 13:04:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-trnlnm-not-returning-expected-strings/m-p/4457460#M42561</guid>
      <dc:creator>Graham Burley</dc:creator>
      <dc:date>2009-07-10T13:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: F$TRNLNM not returning expected strings</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-trnlnm-not-returning-expected-strings/m-p/4457461#M42562</link>
      <description>Mike,&lt;BR /&gt;&lt;BR /&gt;Grahem gave you the formally correct answer.&lt;BR /&gt;&lt;BR /&gt;That may be enough.&lt;BR /&gt;&lt;BR /&gt;But if the desired result would be&lt;BR /&gt;show sym tt&lt;BR /&gt;  TT = "E38589, 10697, 47646"&lt;BR /&gt;&lt;BR /&gt;Then you should do&lt;BR /&gt;DEFINE/SYSTEM BACK$UDT_EXCLUDE_USERS "E38589, 10697, 47646"&lt;BR /&gt;&lt;BR /&gt;Notice that the total value string is enclosed by ONE pair of double quotes.&lt;BR /&gt;&lt;BR /&gt;(a side result will be case preservation in the translation result; but you cured that already with the F$EDIT)&lt;BR /&gt;&lt;BR /&gt;A side remark: if this is in a script, do yourself (and especiallly your collegues!) a big favor and do NOT abbreviate commands, and more so, NEVER shorten to less than 4 characters.&lt;BR /&gt;&lt;BR /&gt;Proost.&lt;BR /&gt;&lt;BR /&gt;Have one on me.&lt;BR /&gt;&lt;BR /&gt;jpe</description>
      <pubDate>Fri, 10 Jul 2009 13:31:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-trnlnm-not-returning-expected-strings/m-p/4457461#M42562</guid>
      <dc:creator>Jan van den Ende</dc:creator>
      <dc:date>2009-07-10T13:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: F$TRNLNM not returning expected strings</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-trnlnm-not-returning-expected-strings/m-p/4457462#M42563</link>
      <description>Oops!&lt;BR /&gt;Same omission twice a day :-(&lt;BR /&gt;&lt;BR /&gt;I should have begun with:&lt;BR /&gt;&lt;BR /&gt;WELCOME to the VMS forum.&lt;BR /&gt;&lt;BR /&gt;Proost.&lt;BR /&gt;&lt;BR /&gt;Have one on me.&lt;BR /&gt;&lt;BR /&gt;jpe</description>
      <pubDate>Fri, 10 Jul 2009 13:33:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-trnlnm-not-returning-expected-strings/m-p/4457462#M42563</guid>
      <dc:creator>Jan van den Ende</dc:creator>
      <dc:date>2009-07-10T13:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: F$TRNLNM not returning expected strings</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-trnlnm-not-returning-expected-strings/m-p/4457463#M42564</link>
      <description>Hi Tom,&lt;BR /&gt; No these are not inside a string (at least as far as I can tell).&lt;BR /&gt;  This is part of a larger set of scripts that manage a Unidata backup.  These were written some time ago, probably under V5 and have not been modified since.&lt;BR /&gt;  For some reason, the users are just now complaining about this.  What it is supposed to do is take a list of users and use that list to create a script that logs users off the system.&lt;BR /&gt;&lt;BR /&gt;As this cluster environment here is new to me, I can't really say what else is going on.  Still trying to get a handle on the multitude of scripts that they have running.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 10 Jul 2009 14:01:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-trnlnm-not-returning-expected-strings/m-p/4457463#M42564</guid>
      <dc:creator>Michael Carlton</dc:creator>
      <dc:date>2009-07-10T14:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: F$TRNLNM not returning expected strings</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-trnlnm-not-returning-expected-strings/m-p/4457464#M42565</link>
      <description>Hi jan&lt;BR /&gt;&lt;BR /&gt; Thanks for the welcome.  It has been several years since I've done VMS system mgmt so I may be a bit rusty in some things.&lt;BR /&gt;&lt;BR /&gt;The original define command does not use the double quotes in defining this logical.&lt;BR /&gt;&lt;BR /&gt;DEF BACK$UDT_EXCLUDE_USERS E38587, E10697, E47646&lt;BR /&gt;&lt;BR /&gt;I will take your advice and change the DEF to the full DEFINE in this procedure.  As mentioned, these were all written many years ago for a VAX/VMS V5.3 environment. (circa 1999).  There have been some updates to account for the fact that they are now running on an ALPHA V7.3-2 system. I suppose I should look at the script that uses the logical to see how they originally expected to see the list.  &lt;BR /&gt;My original post showed how the system displayed the logicals so I would suspect they wanted the user list as a list.  &lt;BR /&gt;This most likely has not worked correctly since the upgrade but has gone unnoticed until now.&lt;BR /&gt;&lt;BR /&gt;I will let you know my results.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 10 Jul 2009 14:30:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-trnlnm-not-returning-expected-strings/m-p/4457464#M42565</guid>
      <dc:creator>Michael Carlton</dc:creator>
      <dc:date>2009-07-10T14:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: F$TRNLNM not returning expected strings</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-trnlnm-not-returning-expected-strings/m-p/4457465#M42566</link>
      <description>Mike,&lt;BR /&gt;&lt;BR /&gt;I will wholeheartedly agree with Jan. The programming to process the strings will be significantly different depending on whether it is outside quotes (creating a search list, which must be processed using the index parameter) or a quoted string (which would be processed in a number of other ways, including using F$ELEMENT).&lt;BR /&gt;&lt;BR /&gt;I strongly recommend searching for all uses of the BACK$UDT_EXCLUDE_USERS logical name and checking how it is used. For that matter, also check that it is used consistently.&lt;BR /&gt;&lt;BR /&gt;- Bob Gezelter, &lt;A href="http://www.rlgsc.com" target="_blank"&gt;http://www.rlgsc.com&lt;/A&gt;</description>
      <pubDate>Fri, 10 Jul 2009 14:36:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-trnlnm-not-returning-expected-strings/m-p/4457465#M42566</guid>
      <dc:creator>Robert Gezelter</dc:creator>
      <dc:date>2009-07-10T14:36:45Z</dc:date>
    </item>
    <item>
      <title>Re: F$TRNLNM not returning expected strings</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-trnlnm-not-returning-expected-strings/m-p/4457466#M42567</link>
      <description>&lt;!--!*#--&gt;Mike,&lt;BR /&gt;&lt;BR /&gt;  At the risk of stating the obvious. Although solutions have been suggested, no one has clearly stated the issue, so here goes:&lt;BR /&gt;&lt;BR /&gt;  On OpenVMS logical names can have multiple translations, known as a "search list". When the translations are device and/or directory specifications, a logical name translation in a file specification will "walk" the search list until a match is found. For example, assume the logical name is defined as:&lt;BR /&gt;&lt;BR /&gt;$ DEFINE MYLOG DISK1:[DIR1],DISK2:[DIR2],DISK3:[DIR3]&lt;BR /&gt;&lt;BR /&gt;The command:&lt;BR /&gt;&lt;BR /&gt;$ TYPE MYLOG:AFILE.TXT&lt;BR /&gt;&lt;BR /&gt;will look for a file called AFILE.TXT in DISK1:[DIR1], if found that file will be displayed. If not found, DISK2:[DIR2] is searched, and so on. It's a way to make multiple devices and or directories appear to be a single entity.&lt;BR /&gt;&lt;BR /&gt;HOWEVER, the command:&lt;BR /&gt;&lt;BR /&gt;$ CREATE MYLOG:NEWFILE.TXT&lt;BR /&gt;&lt;BR /&gt;will only ever create the file in the first entry in the search list, DISK1:[DIR1]. Also any request to translate the logical name without specifying which entry in the list will return only the first entry (index 0).&lt;BR /&gt;&lt;BR /&gt;If you want to translate the whole list, you'll need to traverse the list. Here's an example:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;$ name="BACK$UDT_EXCLUDE_USERS"&lt;BR /&gt;$ tt=F$EDIT(F$TRNLNM(name),"UPCASE")&lt;BR /&gt;$ IF tt.EQS."" THEN GOTO Finished&lt;BR /&gt;$   i=1&lt;BR /&gt;$   Loop: &lt;BR /&gt;$     te=F$EDIT(F$TRNLNM(name,,i),"UPCASE")&lt;BR /&gt;$     IF te.NES.""&lt;BR /&gt;$     THEN&lt;BR /&gt;$       tt=tt+","+te&lt;BR /&gt;$       i=i+1&lt;BR /&gt;$       GOTO Loop&lt;BR /&gt;$     ENDIF&lt;BR /&gt;$   Finished:&lt;BR /&gt;$ SHOW SYM tt&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Note that this doesn't deal with the issue of an entry containing an embedded comma.&lt;BR /&gt;&lt;BR /&gt;(Logical name search list manipulation is a rather weak area in DCL. This makes writing modular code which does things like add a translation to LNM$FILE_DEV or LNM$LIBRARY rather convoluted. Many years ago I proposed the addition of qualifiers for DEFINE to allow appending and prepending a list, inserting and deleting entries. Unfortunately Guy didn't get that far down the stack before he left...)</description>
      <pubDate>Sun, 12 Jul 2009 21:28:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-trnlnm-not-returning-expected-strings/m-p/4457466#M42567</guid>
      <dc:creator>John Gillings</dc:creator>
      <dc:date>2009-07-12T21:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: F$TRNLNM not returning expected strings</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-trnlnm-not-returning-expected-strings/m-p/4457467#M42568</link>
      <description>Michael, you wrote&lt;BR /&gt;"This is in a script that WAS working at one time.  Now it does not.  "&lt;BR /&gt;&lt;BR /&gt;Would you be able to post the script or just an extract ?</description>
      <pubDate>Mon, 13 Jul 2009 00:03:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-trnlnm-not-returning-expected-strings/m-p/4457467#M42568</guid>
      <dc:creator>Thomas Ritter</dc:creator>
      <dc:date>2009-07-13T00:03:56Z</dc:date>
    </item>
    <item>
      <title>Re: F$TRNLNM not returning expected strings</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/f-trnlnm-not-returning-expected-strings/m-p/4457468#M42569</link>
      <description>There is a utility I wrote a long time ago called SLMOD which makes it somewhat easier to manipulate search list logicals from DCL.  It's available through the FREEWARE distributions.&lt;BR /&gt;&lt;BR /&gt;Robert Boyd</description>
      <pubDate>Wed, 15 Jul 2009 16:32:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/f-trnlnm-not-returning-expected-strings/m-p/4457468#M42569</guid>
      <dc:creator>Robert_Boyd</dc:creator>
      <dc:date>2009-07-15T16:32:37Z</dc:date>
    </item>
  </channel>
</rss>

