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
Cloverleaf
Create multible OBX-5 based on \.br\ in the original message
Mike Campbell
We have a client that is requesting that we create multiple OBX-5 segments in place of sending one long one to their engine. We have a tcl script that will replace the \.br\ in the message with either a space or ~ but they aren't happy with it. Suppose something like loop through using the index of the \.br\ and create a new OBX-5 message? Anyone have any ideas or examples?
Thanks.
Find more posts tagged with
Clovertech
Comments
Debbie Davis
We have a tclproc we use for this - creating new obx based on the ~. I'd be happy to email it to you.
Mike Campbell
Thanks Debbie. That would be great.
mike.campbell@nmhs.org
Jim Kosloskey
Undoubtedly each line terminated by \.br\ in the OBX-5 contains spaces so adding another space does not properly terminate each line otherwise once the space were in place (in a temp variable for example) you could treat the data element as a list. If on Cloverleaf 19.1 the 'User' repetition type in an ITERATE would allow you to work through the list repetitions.
So in your existing Tcl proc make your output a Tcl list using list commands so that you get something like this:
some data 1\.br\some data 2\.br\...
becomes something like this:
{{some data 1}{some data 2}...}
The above could also be done using the STRING Action map function and a CONCAT without Tcl if you so decide.
Then if on 19.1 as indicated above use the User Type in an ITERATE. If not on 19.1 then using the List Type ITERATE with a basis of 0, using %l1 counter, and 1 and a Tcl proc to extract each element on your list returning the most current element and the remaining list and null in the most current element when the end of your list is reached.
Inside the ITERATE if the element retrieved is not eq
@null
COPY =0 to $%l1 and COPY the current element returned to the next repetition of the OB OBX (you will need to manage your own counter).
I have a proc that will extract current element and return current element and remaining list as well as a null when the list is exhausted. If you want that proc, email me.
If you have questions about how to use the List ITERATE as I described above, email me.
System
Originally posted by Jason Bond
I would greatly appreciate a copy as well, thanks!
jasonb@samhealth.org
Charlie Bursell
Just out of curiosity.
You say "requesting that we create multiple OBX-5 segments". OBX-5 is not a segment, it is a field. Also you say the vendor does not want repeating fields.
Does this mean multiple OBX segments with a different OBX-5 field? If so, would all of the other data in the OBX segment remain the same? How about the count (OBX-1)?
Just seems to be more to the problem than stated or maybe its just me :-)