Data Item-Numeric Field Reg

venugopaldc

Member
Hi all,

I have a Numeric Data Item of length 25 in my custom table.

When i Enter Value for this Field say 123456789123456789123456, It accepts this value, But in turn it shows in the data base,UTB somethind different 12345678912345670000000.

This applies when i enter a value of length more than 15 in this field.


I can see the changed value of this field in the Debug log INSERT statement to the database other than the one i entered.

In the Event Rule Debugger the BV Value shows the Value I Entered.

Can anyone comment/Suggest on what i am Missing .

Thanks in Advance.

Venugopal C
 
Is it a custom Data Item or an existing Data Item you picked for the job?

Tim.
 
Its a custom data item Tim.

Try this
Create a DD item of length 25 and type Numeric

Create a table using this field

create a view and a interactive application to enter the value.( more than
15 length)

See the Value in the UTB..



Thanks & Regards

Venugopal C
IBM Global Services
Embassy Golf Links,Inner Ring Road,
Bangalore - 560071,
Tel : +91 80 25004865




TimPierce <[email protected]>
Sent by: [email protected]
06/23/2004 05:37 PM
Please respond to
JDELIST One World Developers Discussions


To
Venugopal Chenneerappa/India/IBM@IBMIN
cc

Subject
Re: Data Item-Numeric Field Reg






TimPierce replied to your post at the site: .
http://www.jdelist.com/ubb/showthreaded.php?Cat=&Board=OWDEV&Number=74375

Is it a custom Data Item or an existing Data Item you picked for the
job?Tim.




Venugopal
Oneworld Xe-Develope
 
Well, it looks like OW has a maximum of 15 digits in a numeric field.

Does it have to be numeric? You could store the number is a 25 character length string unless you have to do calculations with it.
 
Hi Venugopal and Tim,

It is strange, because the declarations in
IdxComMN.h
JDEKDFN.h
JDETYPES.h
under \B7\system\include folders are:

#define MAXLEN_MATH_NUMERIC 32

struct tagMATH_NUMERIC {
char String[MAXLEN_MATH_NUMERIC+1]; /* Just the digits -- no separators */
char Sign; /* '-' if negative, 0x00 otherwise */
char EditCode; /* The Data Dictionary edit code to Format for display */
short nDecimalPosition; /* # of digits from right end of string to decimal point */
short nLength; /* The number of digits in s */
WORD wFlags; /* Processing Flags */
char szCurrency[CURRENCY_CODE_SIZE]; /* The Currency Code */
short nCurrencyDecimals; /* The Number of Currency Decimals */
short nPrecision; /* The Data Dictionary Size */
};

for MATH_NUMERIC data type.

Regards,

Zoltán
 
This is just an educated guess, but I think that all the c code (inside psft code) that actually works with math_numeric data interprets the values as a type of 'double'. The 'double' type has a precision of 15 digits.
 
The problem with this data item is in a original aplication or in a customer aplication (System 55-59) or in an original modified aplication????

LF_Alvarez
 
Back
Top