[SOLVED] how do i caluclate with amper variables with large values?
Need to calulate with a (10 dig) 6.000.569.885 number.
-SET &REPEadfTMEAMT = 100 + 1; This gives me the correct result 101.
-SET &REPEadfTMEAMT = 6000569885 + 1; This gives me some asterix(****). SET COUNTWIDTH = ON does not seem to apply to amper variables..
Must be quite simple... but ... no clue ..atm.
thanks in advance for any idea. MarcusThis message has been edited. Last edited by: <Kathryn Henning>,
----------------------------- PROD WF 7.7.02, PMF 5.2.3, MSQL 2005 QA WF 7.7.02, PMF 5.2.3, MSQL 2005 Primarily self-service; adapters: SAP BW, SAP R/3, SQL Server, FlexEnable Windows, all output
September 03, 2014, 08:37 AM
MartinY
Try this :
-SET &REPEadfTMEAMT = 6000569885;
DEFINE FILE CAR
ORG_REPEadfTMEAMT /D11 = &REPEadfTMEAMT;
REPEadfTMEAMT /D11 = &REPEadfTMEAMT + 1;
END
TABLE FILE CAR
PRINT ORG_REPEadfTMEAMT
REPEadfTMEAMT
BY COUNTRY NOPRINT
WHERE RECORDLIMIT EQ 1;
END
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
September 03, 2014, 09:06 AM
Alan B
Use DEFINE FUNCTIONS:
DEFINE FUNCTION ADD(operand/D20,addition/D20)
ADD/A20 =FTOA(operand+addition,'(D20c)','A20');
END
-RUN
-SET &REPEadfTMEAMT = ADD(6000569885, 1);
-TYPE &REPEadfTMEAMT
Alan. WF 7.705/8.007
September 03, 2014, 09:15 AM
Rifaz
When arithmetic is requested, internally changed to double precision, so before it is perfomed, changed the results to alpha.
----------------------------- PROD WF 7.7.02, PMF 5.2.3, MSQL 2005 QA WF 7.7.02, PMF 5.2.3, MSQL 2005 Primarily self-service; adapters: SAP BW, SAP R/3, SQL Server, FlexEnable Windows, all output
September 04, 2014, 04:03 PM
George Patton
If I remember my first year computer science correctly, they gave us an exercise where the object was to add a series of extremely long numbers - and the answer was to turn them into alpha just as is suggested here ...