Path: utzoo!attcan!uunet!husc6!think!ames!pasteur!ucbvax!V3.INFERENCE.COM!BJH From: BJH@V3.INFERENCE.COM (Brian Hagerty x 111) Newsgroups: comp.os.vms Subject: RE: DCL query -- f$parse Message-ID: <8804201645.AA05191@scgvaxd.SCG.HAC.COM> Date: 20 Apr 88 17:44:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 27 Answering Iain McWilliams query ... > I wish to use F$PARSE to create a full file spec in a command file, when I > only supply part of the filename as a parameter. The problem arises when the > default spec is to contain a logical symbol set up as a search list [...] The following code seems to meet your needs: $ define search$path [unit],[subsystem],[project] $ $ inquire file "File" $ $ file = f$parse(file,"standard.dat") $ name = f$parse(file,,,"name") $ type = f$parse(file,,,"type") $ if f$search(file).eqs."" then file = f$search("search$path:''name'''type'") $ $ if file.nes."" then write sys$output file," found!" $ exit $ deck Brian Hagerty [sic] BJH @ V3.INFERENCE.COM Network Manager Inference Corporation Lost Angeles, CA $ eod! -------