Focal Point
[CLOSED] The decimal values are truncating in the target after performing the trans

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/1381057331/m/2977083686

May 11, 2017, 04:21 AM
Kalai
[CLOSED] The decimal values are truncating in the target after performing the trans
Hi all,
I am reading the flat file and performing the transformation, But in the target table the decimal values are truncating(for example if the source file having the value as "562.025" i am getting the output in the target table as "562. ").

The target table data type is "VARCHAR" and the length is 11.

The target transformation is "FPRINT( RECEIVED_QTY, 'P17.6', 'A11V' )".Where RECEIVED_QTY is the column name.

Can any one suggest any solution, i have to get the decimal values also without truncation.

Thanks in advance.......

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8
Windows, All Outputs
May 11, 2017, 05:06 PM
dhagen
What is the format of the source column in the master file?


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
May 12, 2017, 03:05 AM
Kalai
Hi Dhagen

This is the format for source column in the master file.

FIELDNAME=RECEIVED_QTY, ALIAS=Received_Qty, USAGE=P17.6, ACTUAL=A11V,
TITLE='Received_Qty', $


WebFOCUS 8
Windows, All Outputs
May 12, 2017, 05:19 AM
Martin vK
Hi Kalai,

P17.6 indicates that the total length is 17 positions including the decimal point and the 6 positions after that, so 10 positions before the decimal point.
If the total length is 17, I guess in the FPRINT and ACTUAL you should also use A17.
I do not see either why to make it variable length.

regards, Martin.


WebFocus 8203M, iWay DataMigrator, Windows, DB2 Windows V10.5, MS SQL Server, Azure SQL, Hyperstage, ReportCaster
May 12, 2017, 06:27 AM
Kalai
Hi Martin

I tried with the transformation "FPRINT( RECEIVED_QTY, 'P17.6', 'A17V' )", but i am getting the exact value from the source in the target transformation.

Could you help, how to get the exact value from the delimiter sorce file.

Thanks in advance...


WebFOCUS 8
Windows, All Outputs
May 12, 2017, 08:06 AM
dhagen
Change the master

quote:
FIELDNAME=RECEIVED_QTY, ALIAS=Received_Qty, USAGE=A11V, ACTUAL=A11V, TITLE='Received_Qty',$


No transformation required.


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
May 12, 2017, 01:32 PM
Kalai
Hi Dhagen

This is not working. I can not able to get exact value from the source.

Please help me, how to resolve this.

Thanks


WebFOCUS 8
Windows, All Outputs
May 12, 2017, 01:37 PM
dhagen
I cannot help if you don't provide a proper description of the problem. My above post says to change the usage and actual to A11. If that is not working, then what is it doing?


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
May 18, 2017, 02:45 AM
Kalai
quote:
Originally posted by Kalai:
Hi Dhagen

This is not working. I changed Actual & Usage in the .mas file. I can not able to get exact value from the source.

Please help me, how to resolve this.

Thanks



WebFOCUS 8
Windows, All Outputs
May 18, 2017, 09:13 AM
jgelona
If you can, post the complete .mas file and the record. If setting both USAGE and ACTUAL to A11 or A11V doesn't get you the full value, then something is wrong with the data, master or both. You say it is a flat file, then add that it is a "delimiter source file", well, if the master is not right, the data will not be read correctly.


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
May 19, 2017, 10:30 AM
Kalai
Hi jgelona

I can able to read the successfully in the source file .mas file using synonym, but after the transformation decimal value got truncated. I need exact the value with out any truncation.

In the transformation, i am using below function

FPRINT(COLUMN_NAME,'P17.6',A11V)

whether, i need to increase the target table column size.

Please help me to resolve this issue.

Thanks


WebFOCUS 8
Windows, All Outputs
May 19, 2017, 01:57 PM
Michael L Meagher
We need to see your master file description and maybe a record or two of your data.


WebFOCUS 8.2.03 - Production
WebFOCUS 8.2.04 - Sand Box
Windows 2012 R2 Server
HTML, PDF, Excel
In FOCUS since 1980
May 28, 2017, 12:42 PM
Doug
What is your source data?

I see that "FPRINT( RECEIVED_QTY, 'P17.6', 'A11V' )" gives this:
562 562.025
. So, it's really not truncationg as truncation would imply that the source is numberic. This, 'A11V' shows that the source is alpha. So, an alpha to numeric translation is required.


   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Most recent: 8204 Gen 48 in Test and Production.
   Currently Available. Please contact me.