I didn’t really do much with this, but as SMAT are SQLite Databases, you can query them.
cd $HCIROOT/prod_oru_lab/exec/processes/ORU
sqlite3 GlucoTab_ORU_ob.smatdb
sqlite> .mode column
sqlite> .header on
sqlite> .table
smat_info smat_msgs
select MessageContent from smat_msgs where MessageContent like ‘%94728999%GLU%’;
select replace(MessageContent,X’0D’,’\r’) msg from smat_msgs where OrigSourceConn = ‘POCcelerator_ORU’ and MessageContent like ‘%94728999%GLU%’;
The fields in the SMAT_MSGS table are basically what you see in the SMAT Database tool.
Thanks Jim, unfortunetly our smatdb files are encrypted so that won’t work. I was able to use Charlie’s hcismatdb script to get my counts. Aside from the code for looping through the directories, this is all the code I needed then I just parse what is returned in msgCount.