Focal Point
Appending quote to a decimal value
July 17, 2007, 06:51 AM
<Janani>Appending quote to a decimal value
Hi,
I need to append a single quote to a decimal value.After
converting it into alphanumeric also iam not able to append.
For example:
1) TABLE FILE CAR
PRINT
COMPUTE WHEEL/A10 = FTOA(WHEELBASE,'(D10.3)',WHEEL);
COMPUTE WHEELS/A10 = WHEEL; ->value gets printed
COMPUTE WHEELS/A10 = ''''||WHEEL; -> error
END
While appending a single quote i get an error.Please advice.
July 17, 2007, 08:45 AM
Sayedquote:
TABLE FILE CAR
PRINT
COMPUTE WHEEL/A10 = FTOA(WHEELBASE,'(D10.3)',WHEEL);
COMPUTE WHEELS/A10 = WHEEL; ->value gets printed
COMPUTE WHEELS/A10 = ''''||WHEEL; -> error
END
The code worked for me on 761
-* File test.fex
TABLE FILE CAR
PRINT
COMPUTE WHEEL/A10 = FTOA(WHEELBASE,'(D10.3)',WHEEL);
COMPUTE WHEELS/A10 = WHEEL;
COMPUTE WHEELS/A20 = ''''||WHEEL;
END
WF 8.x and 7.7.x Win/UNIX/AS400, MRE/Portal/Self-Service, IIS/Tomcat, WebSphere, IWA, Realmdriver, Active Directory, Oracle, SQLServer, DB2, MySQL, JD Edwards, E-BIZ, SAP BW, R/3, ECC, ESSBASE
July 17, 2007, 08:47 AM
SayedOOh, I see the mistake. You need to make the field value A11 or greater to account for the single quote plus Alpha 10.
WF 8.x and 7.7.x Win/UNIX/AS400, MRE/Portal/Self-Service, IIS/Tomcat, WebSphere, IWA, Realmdriver, Active Directory, Oracle, SQLServer, DB2, MySQL, JD Edwards, E-BIZ, SAP BW, R/3, ECC, ESSBASE
July 20, 2007, 02:52 AM
<Janani>Hi,
It works for me now.But I get a space issue.The reason for me to append a quote in front
of a decimal value is that the value is large hence when viewing in excel the value gets
rounded.
For example:
Actual value: 368865185118.62 In Excel:3.68865E+11
Hence i append the quote.
While appending the quote i get a space issue like this: ' 368865185118.62
Code example:
COMPUTE MarketValue1/A25 = FTOA(PSTN,'(D20.2)',MarketValue1);NOPRINT
COMPUTE MarketValue/A26 = ''''||MarketValue1;
Can you help me with this.
July 20, 2007, 04:46 AM
Tony AJanani,
Rather than
prepend the quote, just get your users to make the column wider in Excel! or use Excel Templates with WebFOCUS and then run a macro that makes the column wider for them.
T
In FOCUS since 1986 | WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2 | | |
WebFOCUS App Studio 8.2.06 standalone on Windows 10 | |