split messages in text file

Homepage Clovertech Forums Read Only Archives Cloverleaf Tcl Library split messages in text file

  • Creator
    Topic
  • #51639
    Mason Miller
    Participant

    I am trying to write a script that will search though a smat file and get fields out of the PV1 segment and PID segment but I am having trouble getting the messages split into a list, I can split each segment but not sure how to split by message I am running this on windows.  any suggestions would be appreciated this is what I am trying with no success

    Code:

    set fileid [open c:mmm_recv.msg r]
    set filedata [read $fileid]

    set fileout [open c:mmm_recv_ecdnums.csv w+]
    set MSG [split $filedata “MSH”]

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

Forum Statistics

Registered Users
5,129
Forums
28
Topics
9,301
Replies
34,447
Topic Tags
288
Empty Topic Tags
10