When you like to change the maxlength parameter of an numeric element of an EDI message, you’ll find out that there is a dirty, nasty little bug in Covast. It can take you weeks to find out how this is actually working.
So as an example, we’re going to change and fix (max) length value of the 9308 Seal_Number element located in the EDI ‘IFTMIN D 99B Default UN’ message. First we open Covast Studio and go to the document repository.
Then you need to find the Seal_Number element with the 9308 tag, or just some other numeric element that you like to change.
So you can open the detail selection of the Seal_Number element by right clicking on this row.
So what we want to achieve is that the Covast transforms the numeric value to a string (EDI)with a fixed length of 15 characters. The problem is that however you checked the ‘fixed length’ checkbox, it won’t work. Covast still translates every input seal number to a value with NO fixed length. The fix is to uncheck the ‘fixed length’ checkbox. Don’t ask me why but it works!
NOTE: don’t forget to recompile the Covast Engine Input File.!
Covast maxlength translation error:
Error encountered: ERROR (62), docnr 10888 :
The length of the element is not correct. Contact the sender.
source format: [101 0 ,XML 1.0]
source document: [IFTMIND 99BDEFAULT UN,Instruction message]
source segment: [data#203,def#1532,name=SEL_Seal_number_S133]
source element: [def#1,elm#0,comp#0,name=_9308_Seal_number_E1], value: [12345678
9012345], maximum length: [10] (msgnr:1 segnr:203)(line:290 pos:29 filepos:17269
