>
> msg.set(43, "location city US");
>
msg.set (43, "LOCATION.................CITY.........CC");
(with blanks instead of dots)
As an alternative, you could configure field 43 as a constructed data
element containing three IF_CHAR fixed length fields.
Our code looks like this for one interface:
// Field 43 - Acceptor Name
Store store = (Store) ctx.tget (STORE);
if (store != null) {
StringBuffer sb = new StringBuffer ();
sb.append (padOrTruncate (store.getName(), 25));
sb.append (padOrTruncate (store.getCity(), 13));
sb.append (padOrTruncate (store.getState(), 2));
m.set (43, sb.toString());
}
Where padOrTruncate does this:
private String padOrTruncate (String s, int len) {
if (s == null)
s = "";
return s.length() > len ? s.substring(0,len) : ISOUtil.strpad(s,len);
}
<br