<?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: Simply variable problem in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/simply-variable-problem/m-p/3962299#M11819</link>
    <description>Martin,&lt;BR /&gt;&lt;BR /&gt;The phrasing in your post is somewhat unclear to me. Some possible interpretations:&lt;BR /&gt;&lt;BR /&gt;Assume the following:&lt;BR /&gt;  P1 = "A"&lt;BR /&gt;  P2 = "B"&lt;BR /&gt;&lt;BR /&gt;$ DEFINE TEST 'P1''P2' yields "AB" as the value of TEST&lt;BR /&gt;&lt;BR /&gt;$ DEFINE TEST 'P1','P2' yields two values (accessible using F$TRNLNM with the index parameter) of "A" and "B" respectively. The SHOW LOGICAL command will show the value as "A","B"&lt;BR /&gt;&lt;BR /&gt;The syntax for concatenation is A+B (or A,B) in the COPY command. To build a command to iterate down the contents of the logical name TEST, you would start with a null string and then concatenate the values in TEST one at a time with the appropriate punctuation. Then use the resulting string as the source parameter of the COPY command.&lt;BR /&gt;&lt;BR /&gt;The above presumes that I have interpreted the posting correctly. If I have not, please let me know.&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>Thu, 15 Mar 2007 06:59:14 GMT</pubDate>
    <dc:creator>Robert Gezelter</dc:creator>
    <dc:date>2007-03-15T06:59:14Z</dc:date>
    <item>
      <title>Simply variable problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/simply-variable-problem/m-p/3962297#M11817</link>
      <description>Hi, I'm struggling to do something that I suspect is utterly simple, so good opportunity for some points for someone!&lt;BR /&gt;&lt;BR /&gt;If I define a logical like this, which concats two parameters&lt;BR /&gt;&lt;BR /&gt;define test 'P1''P2'&lt;BR /&gt;&lt;BR /&gt;how do I then access test to get the contents?&lt;BR /&gt;&lt;BR /&gt;for example to move a file of that combined name&lt;BR /&gt;&lt;BR /&gt;rename [here]test [there]test&lt;BR /&gt;&lt;BR /&gt;Like in unix you would prefix with a $.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Martin</description>
      <pubDate>Thu, 15 Mar 2007 06:42:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/simply-variable-problem/m-p/3962297#M11817</guid>
      <dc:creator>Martin Brindle</dc:creator>
      <dc:date>2007-03-15T06:42:14Z</dc:date>
    </item>
    <item>
      <title>Re: Simply variable problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/simply-variable-problem/m-p/3962298#M11818</link>
      <description>Martin,&lt;BR /&gt;&lt;BR /&gt;logical names are transparently interpreted by RMS, so just do a &lt;BR /&gt;&lt;BR /&gt;$ rename [here]logical [there]logical&lt;BR /&gt;&lt;BR /&gt;(assume that here and there are on the same phy. disk!)&lt;BR /&gt;&lt;BR /&gt;regards Kalle</description>
      <pubDate>Thu, 15 Mar 2007 06:52:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/simply-variable-problem/m-p/3962298#M11818</guid>
      <dc:creator>Karl Rohwedder</dc:creator>
      <dc:date>2007-03-15T06:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: Simply variable problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/simply-variable-problem/m-p/3962299#M11819</link>
      <description>Martin,&lt;BR /&gt;&lt;BR /&gt;The phrasing in your post is somewhat unclear to me. Some possible interpretations:&lt;BR /&gt;&lt;BR /&gt;Assume the following:&lt;BR /&gt;  P1 = "A"&lt;BR /&gt;  P2 = "B"&lt;BR /&gt;&lt;BR /&gt;$ DEFINE TEST 'P1''P2' yields "AB" as the value of TEST&lt;BR /&gt;&lt;BR /&gt;$ DEFINE TEST 'P1','P2' yields two values (accessible using F$TRNLNM with the index parameter) of "A" and "B" respectively. The SHOW LOGICAL command will show the value as "A","B"&lt;BR /&gt;&lt;BR /&gt;The syntax for concatenation is A+B (or A,B) in the COPY command. To build a command to iterate down the contents of the logical name TEST, you would start with a null string and then concatenate the values in TEST one at a time with the appropriate punctuation. Then use the resulting string as the source parameter of the COPY command.&lt;BR /&gt;&lt;BR /&gt;The above presumes that I have interpreted the posting correctly. If I have not, please let me know.&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>Thu, 15 Mar 2007 06:59:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/simply-variable-problem/m-p/3962299#M11819</guid>
      <dc:creator>Robert Gezelter</dc:creator>
      <dc:date>2007-03-15T06:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: Simply variable problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/simply-variable-problem/m-p/3962300#M11820</link>
      <description>Martin&lt;BR /&gt;&lt;BR /&gt;You can use this command to execute a rename:&lt;BR /&gt;&lt;BR /&gt;$ define test 'p1','p2' !define logical name&lt;BR /&gt;$io1=f$trnlnm("test",,0) !Obtain first value&lt;BR /&gt;$io2=f$trnlnm("test",,1) !Obtain second value&lt;BR /&gt;$rename [here]'io1' [there]'io2'&lt;BR /&gt;&lt;BR /&gt;(Remember that rename only works on the same physical disk)&lt;BR /&gt;&lt;BR /&gt;Saludos.&lt;BR /&gt;Daniel.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Mar 2007 07:09:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/simply-variable-problem/m-p/3962300#M11820</guid>
      <dc:creator>Daniel Fernandez Illan</dc:creator>
      <dc:date>2007-03-15T07:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: Simply variable problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/simply-variable-problem/m-p/3962301#M11821</link>
      <description>If I understood your question, you just simply want to use the concatenated logical name definition in your rename command, so...&lt;BR /&gt;&lt;BR /&gt;$ rename [here]'f$trnlnm("test") [there]&lt;BR /&gt;&lt;BR /&gt;Hope that helps.&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Mar 2007 07:17:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/simply-variable-problem/m-p/3962301#M11821</guid>
      <dc:creator>EdgarZamora_1</dc:creator>
      <dc:date>2007-03-15T07:17:35Z</dc:date>
    </item>
    <item>
      <title>Re: Simply variable problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/simply-variable-problem/m-p/3962302#M11822</link>
      <description>I just noticed Karl's response (the first response) and that's your best bet.&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Mar 2007 07:27:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/simply-variable-problem/m-p/3962302#M11822</guid>
      <dc:creator>EdgarZamora_1</dc:creator>
      <dc:date>2007-03-15T07:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: Simply variable problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/simply-variable-problem/m-p/3962303#M11823</link>
      <description>If the [here] and [there] were referring to VMS directories, then logical names won't do what you want.&lt;BR /&gt;&lt;BR /&gt;$ p1 = "ABC"&lt;BR /&gt;$ p2 = ".DAT"&lt;BR /&gt;$ define test 'P1''P2'&lt;BR /&gt;$ sho log test&lt;BR /&gt;   "TEST" = "ABC.DAT" (LNM$PROCESS_TABLE)&lt;BR /&gt;$ cre/dir disk$jscratch:[here]&lt;BR /&gt;$ cre/dir disk$jscratch:[there]&lt;BR /&gt;$ set def disk$jscratch:[here]&lt;BR /&gt;$ cre test&lt;BR /&gt; Exit ! Control Z &lt;BR /&gt;$ dir/siz=all/date/wid=(file:38,size=7)&lt;BR /&gt;&lt;BR /&gt;Directory DISK$JSCRATCH:[HERE]&lt;BR /&gt;&lt;BR /&gt;ABC.DAT;1                                     0/0        15-MAR-2007 08:20:25.17&lt;BR /&gt;&lt;BR /&gt;Total of 1 file, 0/0 blocks.&lt;BR /&gt;&lt;BR /&gt;Appears to have done what you want, but that's not the whole story.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;$ ren [here]test [there]test/log&lt;BR /&gt;%RENAME-E-SEARCHFAIL, error searching for DISK$JSCRATCH:[HERE]TEST.;&lt;BR /&gt;-RMS-E-FNF, file not found&lt;BR /&gt;&lt;BR /&gt;Here filename parsing is confused because of part of the string looks like the directory portion of a file spec.&lt;BR /&gt;&lt;BR /&gt;You probably want to use DCL symbols instead of a logical name.&lt;BR /&gt;&lt;BR /&gt;$ test := 'p1''p2'&lt;BR /&gt;$ sho symbol test  ! symbols are more like unix environment variables&lt;BR /&gt;  TEST = "ABC.DAT"&lt;BR /&gt;$ ren [here]'test' [there]'test'/log&lt;BR /&gt;%RENAME-I-RENAMED, DISK$JSCRATCH:[HERE]ABC.DAT;1 renamed to DISK$JSCRATCH:[THERE]ABC.DAT;1&lt;BR /&gt;$&lt;BR /&gt;&lt;BR /&gt;If you have a logical name and you want to convert to a DCL symbol, user F$TRNLNM  (see help lexical f$trnlnm)&lt;BR /&gt;&lt;BR /&gt;Other differences between rename and mv.  Rename can only rename to the same device.  If there is the possibility that [here] and [there] are on different devices, you will need to use something like backup /delete.</description>
      <pubDate>Thu, 15 Mar 2007 07:39:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/simply-variable-problem/m-p/3962303#M11823</guid>
      <dc:creator>Jon Pinkley</dc:creator>
      <dc:date>2007-03-15T07:39:09Z</dc:date>
    </item>
    <item>
      <title>Re: Simply variable problem</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/simply-variable-problem/m-p/3962304#M11824</link>
      <description>There's a write-up on symbols and on logical names in the FAQ.  It's a common confusion for folks coming over from Unix; the DCL stuff looks really familiar, but different.&lt;BR /&gt;&lt;BR /&gt;I considered posting the section here, but it's about a dozen paragraphs, excluding the sections on arguments and argument lists and other such that follow.&lt;BR /&gt;&lt;BR /&gt;The FAQ is available at:&lt;BR /&gt;&lt;A href="http://www.hoffmanlabs.com/vmsfaq/" target="_blank"&gt;http://www.hoffmanlabs.com/vmsfaq/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;See the section "DCL Details"&lt;BR /&gt;&lt;BR /&gt;Stephen Hoffman&lt;BR /&gt;HoffmanLabs&lt;BR /&gt;</description>
      <pubDate>Thu, 15 Mar 2007 07:49:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/simply-variable-problem/m-p/3962304#M11824</guid>
      <dc:creator>Hoff</dc:creator>
      <dc:date>2007-03-15T07:49:45Z</dc:date>
    </item>
  </channel>
</rss>

