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: I'm sending an 855 and in the ACK02 segment it's supposed to send a qty amount. But the amount is 0 for this order as the parts are on backorder. However, when it sends it just leave the element as *null instead of putting a 0 which is causing an error on the receiver's end. Is there a way to get it to show a value even if it's 0?
There is no way for a numeric field to force a zero automatically to an element. Because the value zero is used to control presence of something (this is the concept of *NULL).
The Solution:
Define a condition on the field in question.
Map the keyword zero to the element when the field is equal to zero.
Note: The same logic can be used for *blanks. To specify the length (how many blanks), set the Minimum Length (Properties) to the desired length.
Read about leading zeros here:
Thinking of a new CHALLENGE? Let us know HERE.