Re: DCL anomaly with the DCL Lexical f$search - VMS

This is a discussion on Re: DCL anomaly with the DCL Lexical f$search - VMS ; "Farrell, Michael" wrote on 05/07/2008 01:46:44 PM: > Has anyone encountered this. > > Here's a snippet from a DCL procedure I am working on: > > $ UPDATE_FILE = f$search("''RCV_LOCN'''RCV_FILE'")! f$search(INPUT_FILE) > > RCV_LOCN has a value of "S04:[AM_TESTS.MIKES]" ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Re: DCL anomaly with the DCL Lexical f$search

  1. Re: DCL anomaly with the DCL Lexical f$search

    "Farrell, Michael" wrote on 05/07/2008 01:46:44
    PM:

    > Has anyone encountered this.
    >
    > Here's a snippet from a DCL procedure I am working on:
    >
    > $ UPDATE_FILE = f$search("''RCV_LOCN'''RCV_FILE'")! f$search(INPUT_FILE)
    >
    > RCV_LOCN has a value of "S04:[AM_TESTS.MIKES]"
    > RCV_FILE has a value of "BSTBOTH_2008103.*"
    >
    > When this code is executed it returns to UPDATE_FILE a null string so
    > that UPDATE_FILE = "".
    >
    > This is wrong because the file it alludes to is there:
    > Directory S04:[AM_TESTS.MIKES]
    >
    > BSTBOTH_2008103.211436;25
    > 6448/7232 7-MAY-2008 12:27:59.37
    > .
    > .
    > .
    >
    > When I write the line without the comment, it works properly.
    >
    > $ UPDATE_FILE = f$search("''RCV_LOCN'''RCV_FILE'")
    > UPDATE_FILE = " BSTBOTH_2008103.211436;25".
    >
    > Why does the "! f$search(INPUT_FILE)" make a difference to the working
    > of the f$search command?
    >

    Not on my OpenVMS. Something else must be going on.
    > TIA
    >
    > Mike Farrell



  2. Re: DCL anomaly with the DCL Lexical f$search

    On Wed, May 7, 2008 at 2:05 PM, wrote:
    >
    >
    >
    >
    > "Farrell, Michael" wrote on 05/07/2008 01:46:44 PM:
    >
    >
    >
    > > Has anyone encountered this.
    > >
    > > Here's a snippet from a DCL procedure I am working on:
    > >
    > > $ UPDATE_FILE = f$search("''RCV_LOCN'''RCV_FILE'")! f$search(INPUT_FILE)
    > >
    > > RCV_LOCN has a value of "S04:[AM_TESTS.MIKES]"
    > > RCV_FILE has a value of "BSTBOTH_2008103.*"
    > >
    > > When this code is executed it returns to UPDATE_FILE a null string so
    > > that UPDATE_FILE = "".
    > >
    > > This is wrong because the file it alludes to is there:
    > > Directory S04:[AM_TESTS.MIKES]
    > >
    > > BSTBOTH_2008103.211436;25
    > > 6448/7232 7-MAY-2008 12:27:59.37
    > > .
    > > .
    > > .
    > >
    > > When I write the line without the comment, it works properly.
    > >
    > > $ UPDATE_FILE = f$search("''RCV_LOCN'''RCV_FILE'")
    > > UPDATE_FILE = " BSTBOTH_2008103.211436;25".
    > >
    > > Why does the "! f$search(INPUT_FILE)" make a difference to the working
    > > of the f$search command?
    > >

    > Not on my OpenVMS. Something else must be going on.
    > > TIA


    Doing my own testing...

    OpenVMS V7.3-2

    Procedure:
    $ rcv_locn = "dis:[krobins9.downloads.testing]"
    $ rcv_file = "test.*"
    $!'f$ver(1)
    $ UPDATE_FILE = f$search("''RCV_LOCN'''RCV_FILE'") ! update_file =
    f$search(input_file)
    $ sho sym update_file
    $ UPDATE_FILE = f$search("''RCV_LOCN'''RCV_FILE'") ! update_file =
    f$searh(input_file)
    $ sho sym update_file
    $ UPDATE_FILE = f$search("''RCV_LOCN'''RCV_FILE'")
    $ sho sym update_file
    $!'f$ver(0)

    Dir output:
    Directory DIS:[KROBINS9.Downloads.testing]

    test.file;1 test_search.com;2

    Total of 2 files.

    Command procedure output:
    $ @test_search
    $!0
    $ UPDATE_FILE = f$search("dis:[krobins9.downloads.testing]test.*") !
    update_file = f$search(input_file)
    $ sho sym update_file
    UPDATE_FILE = "DIS:[KROBINS9.Downloads.testing]test.file;1"
    $ UPDATE_FILE = f$search("dis:[krobins9.downloads.testing]test.*") !
    update_file = f$searh(input_file)
    $ sho sym update_file
    UPDATE_FILE = ""
    $ UPDATE_FILE = f$search("dis:[krobins9.downloads.testing]test.*")
    $ sho sym update_file
    UPDATE_FILE = "DIS:[KROBINS9.Downloads.testing]test.file;1"

    Notice that I misspelled f$search in the second comment and that
    caused a similar problem. Not good.

    Ken

+ Reply to Thread