how to create a file each day

Homepage Clovertech Forums Read Only Archives Cloverleaf Cloverleaf how to create a file each day

  • Creator
    Topic
  • #50960
    Yamil Velez
    Participant

    Hi All

        I have a thread that writes out to a file and each day I must stop the thread in order to get the file.  Is there another way so that everyday instead of me stopping the thread the interface just creates a new file.

    Thanks for all your help

    Yamil

Viewing 4 reply threads
  • Author
    Replies
    • #68198
      Jerry Tilsley
      Participant

      Here is one option, it’s what we use:

      Set the date variable to today:

      set date [clock format [clock seconds] -format “%Y%m%d”]

      Set the outbound filename:

      msgmetaset $mh DRIVERCTL “{FILESET {{OBFILE $date}}}”

      This will send the messages to a file with filename of today’s date.  You can obviously add other identifying text to the front or back of the file.  This way, at midnight it starts writing to a new file.

    • #68199
      Yamil Velez
      Participant

      Hi Jerry

          Where do I set this up in the Netconfig?

      Thanks

      Yamil

    • #68200
      Jerry Tilsley
      Participant

      Put that into a tcl proc, and use it in the UPoC during the Route Message Detail of RAW.

    • #68201
      Ron Archambault
      Participant

      There’s an example of one of these types of procs in $HCIROOT/contrib

      that uses a counter that you might take a look at fileset_numfile_out.tcl.

      This should help you with the DRIVERCTL syntax too.

    • #68202
      Russ Ross
      Participant

      Since you are asking for more details beyond just a high level how to do it using DRIVERCTL metadata, try looking at this URL:

      <a href="http://clovertech.infor.com/viewtopic.php?t=1663&&#8221; class=”bbcode_url”>http://clovertech.infor.com/viewtopic.php?t=1663&amp;

      where I attempted to show a good bit of detail just how to use a TPS proc that changes the name of the outbound file dynamically.

      Granted in the URL above I change the file name for every message and not just once a day but it will give you some of the details of how to implement the TPS proc that renames output files to whatever criteria suits your purpose.

      Russ Ross
      RussRoss318@gmail.com

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

Forum Statistics

Registered Users
5,127
Forums
28
Topics
9,300
Replies
34,445
Topic Tags
288
Empty Topic Tags
10