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
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”]