Simple fileset-Local Proc

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Simple fileset-Local Proc

  • Creator
    Topic
  • #51244

    We have a very complex fileset-local tps script that we use for watching a directory for batches of files. I now have a need to simplify the process. Does anyone have a very simple fileset-local proc that they wouldn’t mind sharing? Is a tps proc even necessary?

    Details: An application ftp’s a batch of .pdf files at 1am. I want to pick up and process the files one a time.

    -- Max Drown (Infor)

Viewing 4 reply threads
  • Author
    Replies
    • #69332
      Jim Kosloskey
      Participant

        Max,

        If al you need to do is get every file in the directory then no dirpars or delete Tps proc is needed.

        However, if for any reason only some of the files need to be selected, then at least a dirparse is probably needed. If you have a file you need to get but should not be deleted in that set, then a delete proc will be needed as well.

        I have sent you some reusable procs we use here.

        email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

      • #69333

        What are the dangers, if any, of using the fileset-local protocol without a custom tps proc?

        -- Max Drown (Infor)

      • #69334
        Jim Kosloskey
        Participant

          Max,

          If you want EVERY file that is in the referenced directory and you want EVERY file retrieved deleted after it is processed, that is the activity the Fileset and Fileset/FTP protocols default to without any procs at dirparse and delete.

          If that is not what you want, for example you only want some of the files in the directory at directory parse or you don’t want some of the files that are retrieved during directory parse then processed deleted, or if you want to rename or move or archive the files before processing (after directory parse) or prior to deleteion you will need to have Tcl procs at either the Directory Parse and/or File Delete UPoCs.

          So with no procs assuming dira has files a, b, and c at the time the directory parse is executed in the Fileset Protocol, each of those files will be read, and each record in each file will become a message to Cloverleaf(R). As a file is finished process (file a first) that file is then deleted (the records of that file have passed through Cloverleaf(R) to wherever you have directed them).

          File a is processed, then deleted, file b is processed then deleted, file c is processed and delted; directory parse happens at the next interval and if there are more files they are processed in the same manner.

          email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.

        • #69335

          Good info. Thanks, Jim.

          -- Max Drown (Infor)

        • #69336

          I have a test fileset-local thread set up with no tps procs. I’m seeing this error over and over again. I’m guessing it’s related to my samba mount issue, but, just to make sure, has anyone ever seen this error?

          [fset:read:ERR /0: [code][fset:read:ERR /0:

          -- Max Drown (Infor)

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