Subscribe to keep this site alive! Under new management but as always, still 100% FREE. Anyone with the IBM i is a friend of ours.
The Challenge: A trading partner does not need the data in AK5 2.0 and wants it to be dropped from the submission. Almost all of the available software's solution is to create a map/definition for it. Note: The trading partner's ask is not out of standards. AK5.2 is optional. The software by default puts it in and no option to override it. Creating a map will be tedious. Trimming it out is the best solution.
The Proposal: As soon as the document is placed in the IFS, a Post-Communication User Exit @@PSTCOMUX (CLP) will be called to remove the delimiter and value of AK5 2.0.
The software passes only one parameter (which is the master communication session) to the user exit, but since we need the communication sub-session (which is the name of the stream file produced), the USUBSSN API should be ran to derive this. There could be several sub-session - hence the loop.
For this particular task, existence in the reference file fetch from the parameters of the file being processed decides if the "trimming" will be done or not. Optionally, the UGETMBXS API can derive these if not written in the file (like an XML or Flat File document).
Do you have a new CHALLENGE? Let us know HERE.