Focal Point
[CLOSED] How to use amper variable for a compute

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

October 23, 2018, 02:33 PM
Jarves
[CLOSED] How to use amper variable for a compute
I'm reading two amper variables &A and &B from two different hold files(the amper variables are I6 on corresponding hold files)

I want to calculate percentage value as below

-SET &C = (&A/&B) *100;

How can I get D3.1 data type for the amper variable &C.

I tried to Define in file and calculate percentage.

DEFINE FILE XYZ
X/I6 = &A;
Y/I6 = &B;
END
TABLE FILE XYZ
SUM
COMPUTE P/D3.1 = (X/Y) *100;
ON TABLE HOLD AS ABC
END
-RUN
-READFILE ABC

The result set is giving 0 rows.

Please help to solve this.

This message has been edited. Last edited by: FP Mod Chuck,
October 23, 2018, 02:40 PM
MartinY
See that post : DM Precision


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
October 23, 2018, 03:52 PM
FP Mod Chuck
jarves

Martin's post is right but I also think you need to reference a real field that exists in XYZ even if you NOPRINT it.

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


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats