<?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: problem getting the correct filename in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/problem-getting-the-correct-filename/m-p/3740214#M33756</link>
    <description>I don't see a loop, but let me allow a few comments / questions:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; $   filename = default&lt;BR /&gt;&lt;BR /&gt;Do you have a symbol named "DEFAULT" or did you intend this:&lt;BR /&gt;$ filename = "default"&lt;BR /&gt;&lt;BR /&gt;&amp;gt;$     dicomFilename = p2 - F$PARSE(p2,,,"VERSION") - ".DCM" - F$PARSE(p1,,,"NAME")+ filename&lt;BR /&gt;&amp;gt;$ dicomFilename = filename&lt;BR /&gt;&lt;BR /&gt;The second command overwrites the result of the first command. I don't know if this is intentional, because there is no explanation what parameters the command procedure is supplied, but I see that the first command line uses |P1| and |P2|. &lt;BR /&gt;&lt;BR /&gt;&amp;gt;$ EXIT&lt;BR /&gt;&amp;gt;$    ENDIF&lt;BR /&gt;&lt;BR /&gt;Note that the procedure will always EXIT here when the symbol |filename| is a non-empty string and "ipl_scanco_prog" will not execute.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;  -dicom_filename            "dicomFilename&lt;BR /&gt;&lt;BR /&gt;I guess this line is read by the program named "ipl_scanco_m.exe", but please note that DCL does not translate the value of the symbol |dicomFilename| for you.&lt;BR /&gt;</description>
    <pubDate>Mon, 27 Feb 2006 14:53:15 GMT</pubDate>
    <dc:creator>Uwe Zessin</dc:creator>
    <dc:date>2006-02-27T14:53:15Z</dc:date>
    <item>
      <title>problem getting the correct filename</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-getting-the-correct-filename/m-p/3740206#M33748</link>
      <description>Hi, &lt;BR /&gt;I have problem renaming a file. In my case it is DICOM File&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I am passing the complete file path as a an argument in 'p1' and 'p2'&lt;BR /&gt;The way I give it to file&lt;BR /&gt;&lt;BR /&gt;"$@''IPL_FILE' ''AIMFILE' ''DICOMFILE'"&lt;BR /&gt;&lt;BR /&gt;so p1 is &lt;BR /&gt;&lt;BR /&gt;AIMFILE     := 'DEV''DIR''FILENAME'.AIM &lt;BR /&gt;&lt;BR /&gt;p2 is &lt;BR /&gt;&lt;BR /&gt;DICOMFILE   :=  'DEV''DIR''FILENAME'.DCM&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;And here is the script attached. I need to use &lt;BR /&gt;&lt;BR /&gt;"dicomFilename" &lt;BR /&gt;&lt;BR /&gt;So I am having trouble at &lt;BR /&gt;$    dicomFilename := F$PARSE(p2,,,"DIRECTORY") + filename&lt;BR /&gt;&lt;BR /&gt;as a symbol &lt;BR /&gt;where i would need that &lt;BR /&gt;dicomFilename is a symbol containg "disk1:[dir1.dir2]chk"&lt;BR /&gt;&lt;BR /&gt;Please let me know if you require further clarification</description>
      <pubDate>Mon, 27 Feb 2006 12:44:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-getting-the-correct-filename/m-p/3740206#M33748</guid>
      <dc:creator>nipun_2</dc:creator>
      <dc:date>2006-02-27T12:44:18Z</dc:date>
    </item>
    <item>
      <title>Re: problem getting the correct filename</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-getting-the-correct-filename/m-p/3740207#M33749</link>
      <description>Nipun,&lt;BR /&gt;if I understand the problem correctly, you just need to use this (not ":=", but a simple "="):&lt;BR /&gt;&lt;BR /&gt;$ dicomFilename = F$PARSE(p2,,,"DIRECTORY") + filename</description>
      <pubDate>Mon, 27 Feb 2006 13:33:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-getting-the-correct-filename/m-p/3740207#M33749</guid>
      <dc:creator>Uwe Zessin</dc:creator>
      <dc:date>2006-02-27T13:33:35Z</dc:date>
    </item>
    <item>
      <title>Re: problem getting the correct filename</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-getting-the-correct-filename/m-p/3740208#M33750</link>
      <description>nipon:&lt;BR /&gt;Try dicomFilename:='F$PARSE(p2,,,"DIRECTORY")'+'filename'&lt;BR /&gt; &lt;BR /&gt;$DIR = "[SYS_MGMT.logs]"&lt;BR /&gt;$DICOMFILE:='DEV''DIR'FILENAME.DCM&lt;BR /&gt;$DEV = "DSA0:"&lt;BR /&gt;$DIR = "[SYS_MGMT.logs]"&lt;BR /&gt;$filename:=change_check.log&lt;BR /&gt;$DICOMFILE:='DEV''DIR''FILENAME' !all Single quotes&lt;BR /&gt;$P2=DICOMFILE&lt;BR /&gt;$dicomFilename:='F$PARSE(P2,,,"DIRECTORY")'+'FILENAME'&lt;BR /&gt;ASDEV1Â» sh sym dicomfilename&lt;BR /&gt;  DICOMFILENAME = "[SYS_MGMT.LOGS]+CHANGE_CHECK.LOG"&lt;BR /&gt;Lawrence</description>
      <pubDate>Mon, 27 Feb 2006 13:35:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-getting-the-correct-filename/m-p/3740208#M33750</guid>
      <dc:creator>Lawrence Czlapinski</dc:creator>
      <dc:date>2006-02-27T13:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: problem getting the correct filename</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-getting-the-correct-filename/m-p/3740209#M33751</link>
      <description>On the line:&lt;BR /&gt;&lt;BR /&gt;dicomFilename := F$PARSE(p2,,,"DIRECTORY") + filename&lt;BR /&gt;&lt;BR /&gt;Remove the ":" in front of the "=" so that it would be as follows:&lt;BR /&gt;&lt;BR /&gt;dicomFilename =  F$PARSE(p2,,,"DIRECTORY") + filename&lt;BR /&gt;&lt;BR /&gt;and this should work.&lt;BR /&gt;&lt;BR /&gt;Phil</description>
      <pubDate>Mon, 27 Feb 2006 13:36:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-getting-the-correct-filename/m-p/3740209#M33751</guid>
      <dc:creator>Phillip Thayer</dc:creator>
      <dc:date>2006-02-27T13:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: problem getting the correct filename</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-getting-the-correct-filename/m-p/3740210#M33752</link>
      <description>Nipon: As Uwe said = works.&lt;BR /&gt;If you use, ":=" whatever is behind it is intrepeted as ASCII strings, so you would need single quotes around both parts to have DCL translate both parts correctly.&lt;BR /&gt;Lawrence</description>
      <pubDate>Mon, 27 Feb 2006 13:43:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-getting-the-correct-filename/m-p/3740210#M33752</guid>
      <dc:creator>Lawrence Czlapinski</dc:creator>
      <dc:date>2006-02-27T13:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: problem getting the correct filename</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-getting-the-correct-filename/m-p/3740211#M33753</link>
      <description>Doesn't work for me, Lawrence:&lt;BR /&gt;&lt;BR /&gt;$ A="12"&lt;BR /&gt;$ B="34"&lt;BR /&gt;$&lt;BR /&gt;$ C:='A'+'B'&lt;BR /&gt;$ show symbol C&lt;BR /&gt;  C = "12+34"&lt;BR /&gt;$&lt;BR /&gt;&lt;BR /&gt;A slightly different version that does not work either:&lt;BR /&gt;&lt;BR /&gt;$ C:="''A'"+"''B'"&lt;BR /&gt;$ show symbol C&lt;BR /&gt;  C = "12+34"&lt;BR /&gt;$&lt;BR /&gt;&lt;BR /&gt;This works:&lt;BR /&gt;$ C=A+B&lt;BR /&gt;$ show symbol C&lt;BR /&gt;  C = "1234"&lt;BR /&gt;$&lt;BR /&gt;&lt;BR /&gt;And this:&lt;BR /&gt;$ C="''A'"+"''B'"&lt;BR /&gt;$ show symbol C&lt;BR /&gt;  C = "1234"&lt;BR /&gt;$</description>
      <pubDate>Mon, 27 Feb 2006 13:51:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-getting-the-correct-filename/m-p/3740211#M33753</guid>
      <dc:creator>Uwe Zessin</dc:creator>
      <dc:date>2006-02-27T13:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: problem getting the correct filename</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-getting-the-correct-filename/m-p/3740212#M33754</link>
      <description>thanks for the reply guys, &lt;BR /&gt;That worked however I have to do F$Parse in a different way. &lt;BR /&gt;&lt;BR /&gt;However, I can't seem to go into the "IF loop"&lt;BR /&gt;&lt;BR /&gt;I want to have the option that if some user writes &lt;BR /&gt;&lt;BR /&gt;filename = "test" file&lt;BR /&gt;&lt;BR /&gt;it should go into the IF LOOP so that we can have that name of the file &lt;BR /&gt;&lt;BR /&gt;otherwise go the normal way. &lt;BR /&gt;&lt;BR /&gt;Currently I feel it just doesn't enter the IF Subroutine. &lt;BR /&gt;&lt;BR /&gt;I am reattaching the script file. Please let me know what I am doing wrong.</description>
      <pubDate>Mon, 27 Feb 2006 14:38:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-getting-the-correct-filename/m-p/3740212#M33754</guid>
      <dc:creator>nipun_2</dc:creator>
      <dc:date>2006-02-27T14:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: problem getting the correct filename</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-getting-the-correct-filename/m-p/3740213#M33755</link>
      <description>thanks for the reply guys, &lt;BR /&gt;That worked however I have to do F$Parse in a different way. &lt;BR /&gt;&lt;BR /&gt;However, I can't seem to go into the "IF loop"&lt;BR /&gt;&lt;BR /&gt;I want to have the option that if some user writes &lt;BR /&gt;&lt;BR /&gt;filename = "test" file&lt;BR /&gt;&lt;BR /&gt;it should go into the IF LOOP so that we can have that name of the file &lt;BR /&gt;&lt;BR /&gt;otherwise go the normal way. &lt;BR /&gt;&lt;BR /&gt;Currently I feel it just doesn't enter the IF Subroutine. &lt;BR /&gt;&lt;BR /&gt;I am reattaching the script file. Please let me know what I am doing wrong.</description>
      <pubDate>Mon, 27 Feb 2006 14:38:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-getting-the-correct-filename/m-p/3740213#M33755</guid>
      <dc:creator>nipun_2</dc:creator>
      <dc:date>2006-02-27T14:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: problem getting the correct filename</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-getting-the-correct-filename/m-p/3740214#M33756</link>
      <description>I don't see a loop, but let me allow a few comments / questions:&lt;BR /&gt;&lt;BR /&gt;&amp;gt; $   filename = default&lt;BR /&gt;&lt;BR /&gt;Do you have a symbol named "DEFAULT" or did you intend this:&lt;BR /&gt;$ filename = "default"&lt;BR /&gt;&lt;BR /&gt;&amp;gt;$     dicomFilename = p2 - F$PARSE(p2,,,"VERSION") - ".DCM" - F$PARSE(p1,,,"NAME")+ filename&lt;BR /&gt;&amp;gt;$ dicomFilename = filename&lt;BR /&gt;&lt;BR /&gt;The second command overwrites the result of the first command. I don't know if this is intentional, because there is no explanation what parameters the command procedure is supplied, but I see that the first command line uses |P1| and |P2|. &lt;BR /&gt;&lt;BR /&gt;&amp;gt;$ EXIT&lt;BR /&gt;&amp;gt;$    ENDIF&lt;BR /&gt;&lt;BR /&gt;Note that the procedure will always EXIT here when the symbol |filename| is a non-empty string and "ipl_scanco_prog" will not execute.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;  -dicom_filename            "dicomFilename&lt;BR /&gt;&lt;BR /&gt;I guess this line is read by the program named "ipl_scanco_m.exe", but please note that DCL does not translate the value of the symbol |dicomFilename| for you.&lt;BR /&gt;</description>
      <pubDate>Mon, 27 Feb 2006 14:53:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-getting-the-correct-filename/m-p/3740214#M33756</guid>
      <dc:creator>Uwe Zessin</dc:creator>
      <dc:date>2006-02-27T14:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: problem getting the correct filename</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-getting-the-correct-filename/m-p/3740215#M33757</link>
      <description>Hi Uwe,&lt;BR /&gt;Thanks for the detailed analysis. By loop I meant the "IF loop"&lt;BR /&gt;&lt;BR /&gt;I want it to enter the loop if the user keeps the variable&lt;BR /&gt;&lt;BR /&gt;filename = ""&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I removed &lt;BR /&gt;&lt;BR /&gt;"EXIT" &lt;BR /&gt;&lt;BR /&gt;command from the IF subroutine. But I think I am still unable to enter the IF subroutine. I have attached the file again with the changes.&lt;BR /&gt;&lt;BR /&gt;Regarding &lt;BR /&gt;&lt;BR /&gt;filename = "default" (I intentionally kept it to see whether it comes up)&lt;BR /&gt;&lt;BR /&gt;&amp;gt;$ dicomFilename = p2 - F$PARSE(p2,,,"VERSION") - ".DCM" - F$PARSE(p1,,,"NAME")+ filename&lt;BR /&gt;&amp;gt;$ dicomFilename = filename&lt;BR /&gt;&lt;BR /&gt;The repition above was because I was not clear whether it does enter the sub-routine and is unable to do the parsing or just skips it. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Regarding p1 and p2 they are input arguments. &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;regaring IPL yeah from then it goes into a seprate application which is fine. I did not wish to eliminate that part for overall clarity.&lt;BR /&gt;&lt;BR /&gt;Pleas let me know if you require further information or clarification.</description>
      <pubDate>Mon, 27 Feb 2006 19:09:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-getting-the-correct-filename/m-p/3740215#M33757</guid>
      <dc:creator>nipun_2</dc:creator>
      <dc:date>2006-02-27T19:09:49Z</dc:date>
    </item>
    <item>
      <title>Re: problem getting the correct filename</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-getting-the-correct-filename/m-p/3740216#M33758</link>
      <description>&lt;BR /&gt;$    IF filename .ne. "" &lt;BR /&gt;$ THEN &lt;BR /&gt;$!     dicomFilename = p2 - F$PARSE(p2,,,"VERSION") - ".DCM" - F$PARSE(p1,,,"NAME")+ filename&lt;BR /&gt;$ dicomFilename = filename &lt;BR /&gt;$    ENDIF&lt;BR /&gt;&lt;BR /&gt;Shouldn't that be ".nes." instead of ".ne."?&lt;BR /&gt;You are comparing strings.&lt;BR /&gt;&lt;BR /&gt;regards Kalle</description>
      <pubDate>Tue, 28 Feb 2006 00:50:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-getting-the-correct-filename/m-p/3740216#M33758</guid>
      <dc:creator>Karl Rohwedder</dc:creator>
      <dc:date>2006-02-28T00:50:24Z</dc:date>
    </item>
    <item>
      <title>Re: problem getting the correct filename</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-getting-the-correct-filename/m-p/3740217#M33759</link>
      <description>Uwe:&lt;BR /&gt;I didn't realize my original statement was ambiguous.&lt;BR /&gt;"If you use, ":=" whatever is behind it is interpeted as ASCII strings, so you would need single quotes around both parts to have DCL translate both parts correctly." typo corrected&lt;BR /&gt;First, single quotes are required for each symbol not the plus sign. Without the single quotes, DCL adds the characters to the string being defined. There are parsing exceptions including single quote and double quotes. &lt;BR /&gt;You didn't follow the whole example I gave.&lt;BR /&gt;$DICOMFILE:='DEV''DIR''FILENAME' !all Single quotes&lt;BR /&gt;There is no "+" sign.&lt;BR /&gt;&lt;BR /&gt;When combining strings, you don't normally need a "+" sign.&lt;BR /&gt;ASDEV1Â» a="12"&lt;BR /&gt;ASDEV1Â» b="34"&lt;BR /&gt;ASDEV1Â» c:='a''b'&lt;BR /&gt;ASDEV1Â» sh sym c&lt;BR /&gt;  C = "1234"&lt;BR /&gt;&lt;BR /&gt;For &lt;BR /&gt;$dicomFilename:='F$PARSE(P2,,,"DIRECTORY")'+'FILENAME'&lt;BR /&gt;if you use ":=", you need single quotes for both parts, otherwise you only get the directory part. For this line you do need the "+" sign if you use ":=". This is probably because of the lexical translation. &lt;BR /&gt;&lt;BR /&gt;ASDEV1Â» c:='a'+'b'&lt;BR /&gt;ASDEV1Â» sh sym c&lt;BR /&gt;  C = "12+34"&lt;BR /&gt;ASDEV1Â» c:=a+b&lt;BR /&gt;ASDEV1Â» sh sym c&lt;BR /&gt;  C = "A+B"&lt;BR /&gt;ASDEV1Â» c:='a+'b&lt;BR /&gt;ASDEV1Â» sh sym c&lt;BR /&gt;  C = "12+34"&lt;BR /&gt;ASDEV1Â» c:=ab&lt;BR /&gt;ASDEV1Â» sh sym c&lt;BR /&gt;  C = "AB"&lt;BR /&gt;Lawrence</description>
      <pubDate>Tue, 28 Feb 2006 20:34:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-getting-the-correct-filename/m-p/3740217#M33759</guid>
      <dc:creator>Lawrence Czlapinski</dc:creator>
      <dc:date>2006-02-28T20:34:10Z</dc:date>
    </item>
    <item>
      <title>Re: problem getting the correct filename</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-getting-the-correct-filename/m-p/3740218#M33760</link>
      <description>nipun: Put the lexical parts of dicomfilename into symbols in your development debug version. Then you can have debug show symbol statements to show what DCL is getting for the parts and for dicomfilename. After you are satisfied, comment them out.&lt;BR /&gt;Lawrence</description>
      <pubDate>Tue, 28 Feb 2006 20:46:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-getting-the-correct-filename/m-p/3740218#M33760</guid>
      <dc:creator>Lawrence Czlapinski</dc:creator>
      <dc:date>2006-02-28T20:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: problem getting the correct filename</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/problem-getting-the-correct-filename/m-p/3740219#M33761</link>
      <description>Yes, I got confused by this statement from you:&lt;BR /&gt;&amp;gt; Try dicomFilename:='F$PARSE(p2,,,"DIRECTORY")'+'filename'&lt;BR /&gt;&lt;BR /&gt;Thanks for the correction.</description>
      <pubDate>Wed, 01 Mar 2006 05:40:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/problem-getting-the-correct-filename/m-p/3740219#M33761</guid>
      <dc:creator>Uwe Zessin</dc:creator>
      <dc:date>2006-03-01T05:40:11Z</dc:date>
    </item>
  </channel>
</rss>

