infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Read Only Archives
Cloverleaf
Cloverleaf
Split, foreach segment issue
System
Originally posted by Johnny Anderson
CL v5.8, HL7 v2.5.1, Sun, Solaris 10.
See tclproc/log attachment. Objective is to read i/p HL7 file, count MSH segments, at count 200, write
FHS to o/p file followed by i/p MSH-OBX segments. There
Find more posts tagged with
Clovertech
Comments
david_barr
From the log file, it looks like your input file doesn't use r as the segment terminator.
System
Originally posted by Johnny Anderson
Attachment shows CR and LF at end of every segment.
RobertKersemakers
Hi Johnny,
But still: the log shows that the result of your 'set msg_list [split $hl7_ip_rec r]' is only one element. So either the split command is incorrect (which is doesn't appear to be) or $hl7_ip_rec doesn't contain any r.
I would focus on the contents of $hl7_ip_rec just before the split command.
System
Originally posted by Johnny Anderson
Thanks David and Robert. Your advice set me on the right trail to the solution. Which is: set msg_list [split $hl7_ip_rec "rn"].
Seems simple now but I used a lot of time trying to get a regsub to help. It did not.