Focal Point
Generating Masters with columns defined as D19.2 instead of P19.2

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/2221048631

November 19, 2005, 06:06 PM
Francis Mariani
Generating Masters with columns defined as D19.2 instead of P19.2
We have DB2 tables with numeric columns defined as Type=DECIMAL, Length=17, Scale=2. When we generate masters for these tables, the column is defined as P19.2. I would like them to be defined as D19.2.

Is there a server setting to change the behaviour of master file generation?

I do not want to manually modify the masters.

Thanks.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
November 28, 2005, 01:48 PM
Kerry
Hi Francis,

Has this issue been resolved? The following topic from Information Builders' online document may be of interest:

Summary: HOLD FORMAT DB2 conversion of Decimal fields
http://techsupport.informationbuilders.com/known_problems/73601010.html

Hope this helps.

Cheers, Smiler

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
November 28, 2005, 03:17 PM
susannah
fyi, same thing happens to us when i use AUTOSQL on the AS400 to gen masters for DB2 files.




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
November 28, 2005, 03:26 PM
Francis Mariani
Kerry, the issue described in the tech support document you provided does not apply exactly to my case.

I would like to have the DB2 decimal columns generated as D99.99 instead of P99.99 as they are now.

Thank you,

Francis.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
November 28, 2005, 03:37 PM
<JG>
For DB2 WebFocus generates Decimal as Packed to be able to support up to 31 positions.
WebFocus generates DB2 float as D format, which can go to D20.0 however subroutines/user functions only supoport D fields up to 16 digits (FTOA).
There is no server setting that can change this behaviour.

If it's simply an output issue because you want comma delimited output you can always specify that in the request ie COLUMN/P20.2C

JG
November 28, 2005, 05:03 PM
jimster06
Francis-
I would be concerned with the potential for loss of precision when converting from packed decimal to floating point.
I'm curious as to what the benefit is in this instance.


jimster06
DevStu WF 7.6.11
W7
HTML, PDF, EXL2K
November 29, 2005, 12:41 PM
Kerry
Hi Francis,

Here is the info I received from one of our consultants.

Are you creating HOLD files? Or, are you using create synonym and not seeing the correct formats? If it is the latter, then the following setting should help:

ENGINE [DB2] SET CONVERSION format [PRECISION pp [ss]]


format

Is any valid format supported by the data source. Possible values are:

INTEGER

Indicates that the command applies only to INTEGER.

DECIMAL

Indicates that the command applies only to DECIMAL columns.

REAL

Indicates that the command applies only to single precision floating point columns.

FLOAT

Indicates that the command applies only to double precision floating point columns.

For this scenario:

ENGINE DB2 SET CONVERSION DECIMAL PRECISION 19 2

If hold files are a problem, then it will be something different.

Hope this helps. Big Grin

Cheers,

Kerry


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
November 29, 2005, 12:50 PM
<JG>
The problem that Francis is having is not with the precision but with the USAGE format that is generated.

There is no way to control that in the metadata except by a manual change.

JG