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
Advantos Systems, Inc.
www.advantos.net 
(760)944-5570 (CA)
(360)923-4838 (WA)
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to