Output from a DirectoryParse Tcl script

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Output from a DirectoryParse Tcl script

  • Creator
    Topic
  • #50987
    Jon Blanchard
    Participant

    This is a dumb question, but what is the output format expected from a Directory Parse Tcl script used with the fileset-local protocol in a thread?

    The output that I generate is a list of the directory and file paths to successful candidate files, but also an error message:

    [0:TEST] ‘D:quovadxqdx5.5integratorplidata/CHROM_Data_08.vrl’ (returned by ‘tpsDirectoryParse {DIRECTORY {D:quovadxqdx5.5integratorplidata}} {FILEMASK {*Data_[0-9][0-9].vrl}}’) does not match { }

    I tried to generate a keyed list using the key FILENAME, but that did not work, either.

    Any help would be appreciated.  Thanks in advance for your response.

    Sr. Interface Developer
    Ardent Health Services

Viewing 5 reply threads
  • Author
    Replies
    • #68299
      Jim Kosloskey
      Participant

      Jon,

      Not a dumb question.

      That is supposed to be a list with the file names only I believe.

      To verify, echo out the directory list you receive I think you will see the directory information is not there.

      Since the Fileset protocol can only parse one directory it doesn’t need to include the directory in the list it gives you and does not need it back either.

      email: jim.kosloskey@jim-kosloskey.com

    • #68300
      David Barr
      Participant

      From the error message, it sounds like you are returning a string that contains the list of files.  What you should be returning is a message disposition list.  Your proc will be passed a message handle, and you do a msgget on that handle to see the list of files in the directory.  You should modify the list, msgset the message with the new results and return “CONTINUE $mh”.

    • #68301
      Ron Archambault
      Participant

      There’s also some examples of these types of procs in $HCIROOT/contrib.

    • #68302
      Robert Kersemakers
      Participant

      David, I have to disagree with you.

      Jim already explained it: the message in the Directory Parse is a list of all the filenames that were scanned. You can then manipulate this list to decide which file you want/don’t want to process (yet).

      And it’s filenames only, not full paths.

      Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

    • #68303
      Rob Abbott
      Keymaster

      David is correct.

      You must return a message handle with a disposition of CONTINUE.  The contents of this message are a list of filenames (full paths are OK).

      Jon is returning a literal string, not a message handle…this is where the problem lies.  So Jon to fix your problem (assume $filename contains your filename to process)

      msgset $mh $filename

      lappend dispList “CONTINUE $mh”

      Hope this makes sense.

      Rob Abbott
      Director, Product Management - Infor Cloverleaf

    • #68304
      Robert Kersemakers
      Participant

      I stand corrected!

      I only read David’s post halfway through. My apologies!

      Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

Viewing 5 reply threads
  • The forum ‘Cloverleaf’ is closed to new topics and replies.

Forum Statistics

Registered Users
5,042
Forums
28
Topics
9,200
Replies
34,023
Topic Tags
267