Reply To: How do I add a trailing bars to a Segment

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf How do I add a trailing bars to a Segment Reply To: How do I add a trailing bars to a Segment

#59359
Jim Kosloskey
Participant

    Darren,

    I may have given bad advice.

    I have not been requested often to provide separators for ending fields which have nothing in them. I think the suggestion I made was how I resolved the issue when I was on release 3.5 of Cloverleaf(R).

    I see that trying it on release 5.2 of Cloverleaf(R) that does not work.

    Will the receiving system accept the last field having one space?

    If so then simply COPYing a single space to the last field should put its leading separator in place.

    I have seen others also CONCAT the presrbed number of separators to the last field they poulate to fill out the number of needed separators.

    I do not particularly like that method because if the field separator changes in a message (in MSH-2) then the value used in the CONCAT no longer mean field separator.

    If the receiving system insists on having all fields accounted for even if there is no data (not the HL/7 intent by the way) and does not behave properly if you place a space in the last field you may need to do the CONCAT technique or perhaps deploy Tcl.

    I will cogitate for a while on this and let you know if I think of something else.

    Of course you could always approach the receiving system and query them as to why they would require you to put place holders in fort non existent fields. Maybe they don’t really need them.

    Jim Kosloskey

    email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.