Bill; Isn't the 'MR%5' supposed to fill the string with zeros? It does exactly what I'd expect. I'd check that the FMT is actually working as you expect.
This looks like it might be a "fix" for the day 10000 problem and left-justified dicts. As long as you leave the dict as 8R I'd just remove the FMT and OCONV altogether. I'm not sure if this actually answers your question - but I hope it solves the problem. Hth Colin >-----Original Message----- >From: Bill Haskett > >I'm trying to figure out why UD BASIC converts an empty string >to five zeros on an OCONV "MR.." mask. USING the FMT function >(FMT( ...., '5/0R')) works fine. > >AE DICT APOPEN CKDATE >Top of "CKDATE" in "DICT APOPEN", 7 lines, 119 characters. >*--: p >001: I The date of the check that paid this invoice. >002: OCONV( TRANS( "APCHECKS", CHECK_ID, 4, "X"), 'MR%5' ) >003: D2- >004: DATE PD >005: 8R >006: S >007: > >...and UDT.OPTIONS 56 ON and UDT.OPTIONS 110 OFF. When I >output the file using CKDATE, which is an empty string, I get: > >DATE PD. >12-31-67 > >...and raw output (not converted for date) looks like: > >DATE PD. > 00000 > >The following adjustment to the dictionary: > >AE DICT APOPEN CKDATE >Top of "CKDATE" in "DICT APOPEN", 7 lines, 119 characters. >*--: p >001: I The date of the check that paid this invoice. >002: FMT( TRANS( "APCHECKS", CHECK_ID, 4, "X" ), '7/0R' ) >003: D2- >004: DATE PD >005: 8R >006: S >007: > >...returns, correctly, the following: > >DATE PD. > > >The OCONV function converts an empty string to a field of five >zeros (00000). Is there a fix for this, or is 'MR%5' an invalid mask? > >As always, thanks. > >Bill Haskett ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/
