Rlist display lengths and conversions (OpenInsight 32-bit Specific)
At 25 JAN 2003 04:33:42PM Richard Hunt wrote:
While testing some conversion software (IBM UniVerse to OI), I noticed something very interesting.
After the conversion of a table into OI, I RLISTed some rows to verify everything was looking ok. Well one field was looking kinda strange. I couldn't figure out the problem until I actually opened the record in the "SYSTEM EDITOR" and viewed the "raw" data. Nothing was wrong.
Here is the thing…
It seems that "RLIST" handles the "display length" before "conversion". Not a good thing.
Try this and you will see what I mean. Choose a dictionary row that handles dollars and cents. Set the conversion to "MD2," and set the display length to "10" and "T" (I know that it should be "R" I am just explaining the flaw in the easiest example). Now display rows with amounts less than 10 in length.
So like an amount of "95.94" now becomes "95,94 , ". It should come out as "95.94 " (with blank spaces to the right).
I found this while auditing locations (city, state zip). I had my location dictionary item set as display length "20" and "T" with a conversion of "LOCATION". The location conversion iconvs and oconvs. for the iconv location "ONTARIO*CA*91761", I was seeing on the oconv "ONTARIO, CA 91761-", since the string sent to the location conversion was not "ONTARIO*CA*91761" it was "ONTARIO*CA*91761 ". The zip code is extracted from the location and checked for specific lengths. A 9 digit zip code is 00000-0000, or in this case … "91761- ".
Once I trimmed the zip code all became ok.