how do I delay a message using TCL?

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf how do I delay a message using TCL?

  • Creator
    Topic
  • #48421
    John Harvey
    Participant

      I’m hoping this is a stupid question with a simple solution: I’d like to know how to hold onto a message for a few seconds before forwarding it to another thread?

      for instance:

      thread a gets an hl7 message from an outside source

      within thread a, use tcl and hold the message for 5 seconds

      after 5 to 10 seconds, forward the message to thread b

      Any help is greatly appriciated…thanks!

      John

    Viewing 2 reply threads
    • Author
      Replies
      • #58595
        Michael Lacriola
        Participant

          I once had to hold a message for longer than that. What I did was write the message to a local directory (for me somewhere on the rs/6000) then create another thread (fileset-local) that had a tps proc for the directory parse that would check to see if the file was at leat 2 minutes old. If it was, include it. You can then go on from there.

        • #58596
          Chris Williams
          Participant

            How about a line of tcl:

                sleep 5

            Cheers.

          • #58597
            Jim Kosloskey
            Participant

              Chris,

              Actually sleep (and I think the other delay Tcl commands) will all cause the entire PROCESS to wait.

              That is probably not a good thing.

              Jim Kosloskey

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

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