Is it possible to have multiple OBDIRs in a TCL proc?

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Is it possible to have multiple OBDIRs in a TCL proc?

  • Creator
    Topic
  • #55578
    Sterling Jones
    Participant

      I’m working on trying to figure out how to reduce the number of threads I use.

      I have a process that is an inbound fileset-ftp that pushes raw to an outbound fileset-local. The one inbound is on a schedule that executes twice daily. Files A and B are both in the same remote directory. File A is picked up at 04:30; File B at 23:45. They both are delivered to the same location on a network share. File B, however, also needs to go into a child archive directory with a timestamp prepended.

      I am developing a TCL proc that goes on outbound pane of the outbound connection in the TPS Outbound Data container. Since both files will go through this TCL, the thought is to get the name of the file and handle only File B specially. This is probably TCL 101, but is it possible to “duplicate” the file here and send another copy to another destination? Is it possible to copy the mh into a new message with new OBFILE and OBDIR keyed lists? Here is a snippet of the TCL I have already:

      run {

    Viewing 1 reply thread
    • Author
      Replies
      • #85802
        Keith McLeod
        Participant

          You could create a new handle and associate different metadata with it before appending to your dispList.

          Take a look at hl7Raw_ack.tcl located in $HCIROOT/tclprocs for an idea of what you can do….

          set obMsg [msgcreate -type reply] You probably want -type data

          Set new metadata for DRIVERCTL

          return “{CONTINUE $mh} {CONTINUE $obMsg}”

          Not tested but should give you some direction.

        • #85803
          Sterling Jones
          Participant

            Keith McLeod wrote:

            You could create a new handle and associate different metadata with it before appending to your dispList.

            Take a look at hl7Raw_ack.tcl located in $HCIROOT/tclprocs for an idea of what you can do….

            set obMsg [msgcreate -type reply] You probably want -type data

            Set new metadata for DRIVERCTL

            return “{CONTINUE $mh} {CONTINUE $obMsg}”

            Not tested but should give you some direction.

            Hi Keith, THANK YOU. This was a great help in pointing me in the right direction. I played with a couple of options, but ultimately found what works. It may not be the most efficient, but I learned a couple of things (these may be common knowledge, but I didn’t know as a relative beginner):

            * msgcreate created a blank, empty message. While this did create a new skeleton message (message1), it didn’t have any data in it, which led me to…

            * msgcopy worked for what I needed. It made message1 (obMsg) with data from message0 (mh).

            I still followed what you said in regards to message creation and defining specific metadata for its DRIVERCTL. Here is my final code (improvement suggestions are welcome):

            run {

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