Validating a sender file using a JAVA UDF in PI message mapping
I have a sender file with one header and multiple detail lines. I have been asked to read a tag on the header which contains the total number of detail lines.
I then loop round the detail lines counting the total number. If the total number of detail lines matches the total value in the header tag then XI can process the files otherwise the mapping should raise an exception.
Has anyone encountered this before and if so do you have an example of the Java code you used ?