<?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: DCL F$PARSE Bug? in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/dcl-f-parse-bug/m-p/4965063#M33799</link>
    <description>I guess that the whole OS (which uses $PARSE)&lt;BR /&gt;is wrong, too.&lt;BR /&gt;&lt;BR /&gt;alp $ show default&lt;BR /&gt;  ALP$DKA0:[SMS]&lt;BR /&gt;&lt;BR /&gt;alp $ dire ALP$DKA100:&lt;BR /&gt;%DIRECT-W-NOFILES, no files found&lt;BR /&gt;&lt;BR /&gt;(There exists an empty "ALP$DKA100:[SMS]".)&lt;BR /&gt;&lt;BR /&gt;alp $ dire ALP$DKB300:&lt;BR /&gt;%DIRECT-E-OPENIN, error opening ALP$DKB300:[SMS]*.*;* as input&lt;BR /&gt;-RMS-E-DNF, directory not found&lt;BR /&gt;-SYSTEM-W-NOSUCHFILE, no such file&lt;BR /&gt;&lt;BR /&gt;This is the way it works.  I'd bet against it&lt;BR /&gt;ever being changed.&lt;BR /&gt;&lt;BR /&gt;What should be used for the directory if you&lt;BR /&gt;specify only the device?  Or for the device&lt;BR /&gt;if you specify only the directory?  Perhaps&lt;BR /&gt;some sort of "default" device and directory?&lt;BR /&gt;&lt;BR /&gt;Sometimes life is hard.</description>
    <pubDate>Tue, 07 Mar 2006 08:14:51 GMT</pubDate>
    <dc:creator>Steven Schweda</dc:creator>
    <dc:date>2006-03-07T08:14:51Z</dc:date>
    <item>
      <title>DCL F$PARSE Bug?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-f-parse-bug/m-p/4965058#M33794</link>
      <description>I always assumed if you run F$PARSE and ask it to return a field, if the field doesn't exist it returns blank.&lt;BR /&gt;&lt;BR /&gt;In this example, for DEVICE and DIRECTORY, it keeps returning the environment default which I'm sure is wrong.&lt;BR /&gt;&lt;BR /&gt;For filename, it correctly returns blank!&lt;BR /&gt;&lt;BR /&gt;ALPHA_ROB$$ @ROB.TMP&lt;BR /&gt;$ SH DEF&lt;BR /&gt;  SY:[LIVE.DAT]&lt;BR /&gt;$ WS F$PARSE("SY2:[LIVE.XXX]",,,"DIRECTORY")&lt;BR /&gt;[LIVE.XXX]&lt;BR /&gt;$ WS F$PARSE("SY2:",,,"DIRECTORY")&lt;BR /&gt;[LIVE.DAT]&lt;BR /&gt;$ WS F$PARSE("SY2:[LIVE.XXX]",,,"NAME")&lt;BR /&gt;&lt;BR /&gt;ALPHA_ROB$$ &lt;BR /&gt;</description>
      <pubDate>Tue, 07 Mar 2006 05:51:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-f-parse-bug/m-p/4965058#M33794</guid>
      <dc:creator>Robert Atkinson</dc:creator>
      <dc:date>2006-03-07T05:51:01Z</dc:date>
    </item>
    <item>
      <title>Re: DCL F$PARSE Bug?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-f-parse-bug/m-p/4965059#M33795</link>
      <description>Robert,&lt;BR /&gt;&lt;BR /&gt;For that matter, a similar comment applies to the DEVICE option. Both DEVICE and DIRECTORY operate as you describe, with and without the SYNTAX_ONLY option.&lt;BR /&gt;&lt;BR /&gt;Operationally, you can describe the operation as a "silent" third default string, that of the current default device string.&lt;BR /&gt;&lt;BR /&gt;In any event, it is not a recent change. I checked it on 6.2.&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>Tue, 07 Mar 2006 06:03:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-f-parse-bug/m-p/4965059#M33795</guid>
      <dc:creator>Robert Gezelter</dc:creator>
      <dc:date>2006-03-07T06:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: DCL F$PARSE Bug?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-f-parse-bug/m-p/4965060#M33796</link>
      <description>That's worrying. If it's been like that for so long, it must be by design.&lt;BR /&gt;&lt;BR /&gt;I can't think why you'd have 2 different outputs for the same method of call though!&lt;BR /&gt;&lt;BR /&gt;Rob.&lt;BR /&gt;</description>
      <pubDate>Tue, 07 Mar 2006 06:10:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-f-parse-bug/m-p/4965060#M33796</guid>
      <dc:creator>Robert Atkinson</dc:creator>
      <dc:date>2006-03-07T06:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: DCL F$PARSE Bug?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-f-parse-bug/m-p/4965061#M33797</link>
      <description>F$PARSE inherits it's behaviour from the SYS$PARSE RMS call, which has always behaved that way.  A process has a default disk and directory that can be returned when not supplied otherwise, but there is no default filename.  If there was an f$file_scan function, it would probably do what you want.&lt;BR /&gt;&lt;BR /&gt;Supply a bogus DECnet node for the second argument and it will suppress using the process default directory, e.g. f$parse("SYS2:","XXX::",,"DIRECTORY)</description>
      <pubDate>Tue, 07 Mar 2006 06:26:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-f-parse-bug/m-p/4965061#M33797</guid>
      <dc:creator>David Jones_21</dc:creator>
      <dc:date>2006-03-07T06:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: DCL F$PARSE Bug?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-f-parse-bug/m-p/4965062#M33798</link>
      <description>Surely if run from a command file, then a default NAME and TYPE does exist, but $PARSE doesn't use them.&lt;BR /&gt;&lt;BR /&gt;The behaviour changes dependent on the return field, which I found very worrying.&lt;BR /&gt;&lt;BR /&gt;However, this is documented in the DCL Dictionary :-&lt;BR /&gt;&lt;BR /&gt;"If you omit the device and directory names in the filespec argument, the F$PARSE function supplies defaults, first from the default-spec argument and second from the related-spec argument. If names are not provided by these arguments, the F$PARSE function uses your current default disk and directory. "&lt;BR /&gt;&lt;BR /&gt;But, I don't agree with this.&lt;BR /&gt;&lt;BR /&gt;F$PARSE by it's very name should return a parsed string of the information yuo give it. By this example, there is no way to explicitly return the DEVICE or DIRECTORY as blank.&lt;BR /&gt;&lt;BR /&gt;In fact you have to do something like this, which is pants! :-&lt;BR /&gt;&lt;BR /&gt;$ IF F$PARSE("ABC.COM","[XXXX]",,"DIRECTORY") .EQS. "[XXXX]" THEN ......&lt;BR /&gt;&lt;BR /&gt;Robert.&lt;BR /&gt;</description>
      <pubDate>Tue, 07 Mar 2006 06:39:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-f-parse-bug/m-p/4965062#M33798</guid>
      <dc:creator>Robert Atkinson</dc:creator>
      <dc:date>2006-03-07T06:39:40Z</dc:date>
    </item>
    <item>
      <title>Re: DCL F$PARSE Bug?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-f-parse-bug/m-p/4965063#M33799</link>
      <description>I guess that the whole OS (which uses $PARSE)&lt;BR /&gt;is wrong, too.&lt;BR /&gt;&lt;BR /&gt;alp $ show default&lt;BR /&gt;  ALP$DKA0:[SMS]&lt;BR /&gt;&lt;BR /&gt;alp $ dire ALP$DKA100:&lt;BR /&gt;%DIRECT-W-NOFILES, no files found&lt;BR /&gt;&lt;BR /&gt;(There exists an empty "ALP$DKA100:[SMS]".)&lt;BR /&gt;&lt;BR /&gt;alp $ dire ALP$DKB300:&lt;BR /&gt;%DIRECT-E-OPENIN, error opening ALP$DKB300:[SMS]*.*;* as input&lt;BR /&gt;-RMS-E-DNF, directory not found&lt;BR /&gt;-SYSTEM-W-NOSUCHFILE, no such file&lt;BR /&gt;&lt;BR /&gt;This is the way it works.  I'd bet against it&lt;BR /&gt;ever being changed.&lt;BR /&gt;&lt;BR /&gt;What should be used for the directory if you&lt;BR /&gt;specify only the device?  Or for the device&lt;BR /&gt;if you specify only the directory?  Perhaps&lt;BR /&gt;some sort of "default" device and directory?&lt;BR /&gt;&lt;BR /&gt;Sometimes life is hard.</description>
      <pubDate>Tue, 07 Mar 2006 08:14:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-f-parse-bug/m-p/4965063#M33799</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2006-03-07T08:14:51Z</dc:date>
    </item>
    <item>
      <title>Re: DCL F$PARSE Bug?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-f-parse-bug/m-p/4965064#M33800</link>
      <description>No....$PARSE should be $PARSE, not $SEARCH.&lt;BR /&gt;&lt;BR /&gt;If you want to start using defaults, then you should have to explicitly supply them, i.e. :-&lt;BR /&gt;&lt;BR /&gt;$ WS "FILE = " + F$PARSE("","CHANGED.TMP",,"NAME")&lt;BR /&gt;FILE = CHANGED&lt;BR /&gt;$ WS "FILE = " + F$PARSE("",,,"NAME")&lt;BR /&gt;FILE = &lt;BR /&gt;&lt;BR /&gt;If I want dynamic defaulting, I just need to do F$PARSE("FILE.COM",F$ENV("DEFAULT"),,"NAME")&lt;BR /&gt;&lt;BR /&gt;I restate....there is no way to return "" for F$PARSE("",,,"DIRECTORY").&lt;BR /&gt;&lt;BR /&gt;Rob.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 07 Mar 2006 08:24:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-f-parse-bug/m-p/4965064#M33800</guid>
      <dc:creator>Robert Atkinson</dc:creator>
      <dc:date>2006-03-07T08:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: DCL F$PARSE Bug?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-f-parse-bug/m-p/4965065#M33801</link>
      <description>Yup.  As Mr. Jones said, you want an&lt;BR /&gt;f$file_scan function.&lt;BR /&gt;&lt;BR /&gt;Writing your own was easier before ODS5&lt;BR /&gt;extended file names, too.  Looking for "["&lt;BR /&gt;and "]" is not what it once was.&lt;BR /&gt;&lt;BR /&gt;Everything's complicated.</description>
      <pubDate>Tue, 07 Mar 2006 08:34:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-f-parse-bug/m-p/4965065#M33801</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2006-03-07T08:34:08Z</dc:date>
    </item>
    <item>
      <title>Re: DCL F$PARSE Bug?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-f-parse-bug/m-p/4965066#M33802</link>
      <description>I agree with most prior sentiments.&lt;BR /&gt;&lt;BR /&gt;First:  This is the way it is, and even if it might be wrong it can not be changed for the default case or it would break too much. I suppose one could design an alternative to "SYNTAX_ONLY", perhaps "FILESCAN", but that does not seem worth it to me. Still, Guy might like it and it would simply map onto the existing system service SYS$FILESCAN.&lt;BR /&gt;&lt;BR /&gt;Second: Ido not  think it to be wrong, albeit maybe lsightly confusion to some. &lt;BR /&gt;Think of it this way: F$PARSE does what 'the system would do' and gives you string handles to play with.&lt;BR /&gt;If you were to tell the system to $CREATE TMP&lt;BR /&gt;That is: no extention and it will not add an extention and thus parse does not return one.&lt;BR /&gt;Now issue $CREATE .TMP &lt;BR /&gt;There is no file name, only an extention, and the system will not add a filename  and consistently F$PARSE does not return one.&lt;BR /&gt;In both cases however the file is created in the default directory and consistently F$PARSE returns that string.&lt;BR /&gt;&lt;BR /&gt;For a slightly more elegant workaround I would recommend a brute-force string subtraction. It avoids the conditional:&lt;BR /&gt;&lt;BR /&gt;$ test_dir = f$parse ("test:","&lt;NOTHING&gt;",,"DIRECTORY","SYNTAX_ONLY")&lt;BR /&gt;$ show symb test_dir&lt;BR /&gt;  TEST_DIR = "&lt;NOTHING&gt;"&lt;BR /&gt;$ test_dir = test_dir - "&lt;NOTHING&gt;"&lt;BR /&gt;$ show symb test_dir&lt;BR /&gt;  TEST_DIR = ""&lt;BR /&gt;&lt;BR /&gt;(I threw in the case difference for fun :-).&lt;BR /&gt;&lt;BR /&gt;Hope this helps some,&lt;BR /&gt;Regards,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/NOTHING&gt;&lt;/NOTHING&gt;&lt;/NOTHING&gt;</description>
      <pubDate>Tue, 07 Mar 2006 08:45:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-f-parse-bug/m-p/4965066#M33802</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2006-03-07T08:45:52Z</dc:date>
    </item>
    <item>
      <title>Re: DCL F$PARSE Bug?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-f-parse-bug/m-p/4965067#M33803</link>
      <description>oh my, lots of replies while I was slowly making mine.&lt;BR /&gt;And I was not even really done. The warmign on the lower case was only half of it. There is also a warning on the pointy brackets vs square brackets:&lt;BR /&gt;&lt;BR /&gt;$test_dir = f$parse ("test:[abc]","&lt;NOTHING&gt;",,"DIRECTORY")&lt;BR /&gt;$ show symb test_dir&lt;BR /&gt;  TEST_DIR = "&lt;ABC&gt;"&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt; No....$PARSE should be $PARSE, not $SEARCH.&lt;BR /&gt;&lt;BR /&gt;That is exactly what "SYNTAX_ONLY" accomplishes: no search.&lt;BR /&gt;It stops the actual search (which is the only way to return a dynamic file version string, but parse still tells you where it would have looked&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;/ABC&gt;&lt;/NOTHING&gt;</description>
      <pubDate>Tue, 07 Mar 2006 08:53:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-f-parse-bug/m-p/4965067#M33803</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2006-03-07T08:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: DCL F$PARSE Bug?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-f-parse-bug/m-p/4965068#M33804</link>
      <description>&lt;BR /&gt;Interesting to read peoples points of view on this - wobbly bottom lip to know I'm in the minority on this one :(&lt;BR /&gt;&lt;BR /&gt;I've logged an issue on the HP Advocacy site to see if they can add a "PARSE_ONLY" qualifier, which should make me and everyone else happy again :)&lt;BR /&gt;&lt;BR /&gt;Rob.&lt;BR /&gt;&lt;BR /&gt;P.S. Still disagree about the functionality of something that 'parses', so please feel free to leave you comments on how wrong I am ;)&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 07 Mar 2006 08:59:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-f-parse-bug/m-p/4965068#M33804</guid>
      <dc:creator>Robert Atkinson</dc:creator>
      <dc:date>2006-03-07T08:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: DCL F$PARSE Bug?</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-f-parse-bug/m-p/4965069#M33805</link>
      <description>&lt;A href="http://www.hpuseradvocacy.org/node/1994" target="_blank"&gt;http://www.hpuseradvocacy.org/node/1994&lt;/A&gt;</description>
      <pubDate>Wed, 08 Mar 2006 05:48:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-f-parse-bug/m-p/4965069#M33805</guid>
      <dc:creator>Ian Miller.</dc:creator>
      <dc:date>2006-03-08T05:48:18Z</dc:date>
    </item>
  </channel>
</rss>

