append to a file

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf append to a file

  • Creator
    Topic
  • #51516
    Mason Miller
    Participant

      I am trying to copy the MR number to a file for every transcation that comes though a cetain interface I have a xlt proc that I am adding to pre proc inside of xlate I can get the mr# to copy to this file by using puts but I cannot get it to append it keeps over writing here is what I am doing any  suggestions?

      Code:

      set MUDR $xlateInVals
      set MRList [open d:/quovadx/qdx5.7/integrator/MRList.txt w]
      puts  $MRList   “$MUDR r n”
      close $MRList

    Viewing 3 reply threads
    • Author
      Replies
      • #70587
        Jim Kosloskey
        Participant

          Change your access from w to a –

          set MRList [open d:/quovadx/qdx5.7/integrator/MRList.txt a]

          Are you sure you want to do this inside an Xlate where you are opening and closing the file with each message or would it be better to do this some other way?

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

        • #70588
          Tom Rioux
          Participant

            Mason,

            Try changing your “w” to an “a”

            set MRList [open d:/quovadx/qdx5.7/integrator/MRList.txt a]

            Hope this helps…

            Tom Rioux

          • #70589
            Mason Miller
            Participant

              Thank you thats what I was looking for.

            • #70590
              Mason Miller
              Participant

                I am trying to write the MRN to a file with the current date and time added if the Physican ID matches what is in a table I was going to just use xlate of the existing adt interface to this Doctor group using xlate to write the conditions but it seems to be causing problems when we test with a high volume of transactions my question is would it be better to write a tcl proc that does this or just create a new thread and use fileset-local to write this to the file?  I have already wrote the proc but would this have the same affect as they way I was doing it before.

                Thanks

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