Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


Connect to myibi
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Convert Alpha to Number and Store in a numeric field - possible???

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Convert Alpha to Number and Store in a numeric field - possible???
 Login/Join
 
Gold member
posted
All,
I have a requirement where i need to validate a column such a way whenever i found zero in the column then it should say 'N/A' else it has to do the given calculation. I had used FTOA for this.here is the define condition that i used.
 COLAB/A15=IF COLA EQ 0 THEN 'N/A' ELSE FTOA((COLA / COLB), '(D12.2-%)', COLAB);
 
.
But because of this i am getting delay in report,and also for a given condition it gives some junk values.Then in total also i am not able to see the values for the given column.

Is there a way to store the 'N/A' in the numeric feild?If i store 'N/A' as number then there will be any issues in the grand total of the column?

Any sugeestion or existing discussions??

Regards


Dev:
Dev Studio 7.1.6,Report Caster 7.1.1,Servlet
Local:
Dev Studio 7.1.6,Report Caster 7.1.1,Apache 5.0.2,
Win XP


 
Posts: 80 | Registered: March 21, 2007Report This Post
Virtuoso
posted Hide Post
Prasanna

If I understand this well the field is an alpha format?

You can say

NEWFIELD/D12.2=EDIT(ALPHAFIELD);

then if the field is real alpha you will get 0, you can now do any calculation on this numeric field

If the field is numeric it depends if it is packed or not
take a look at PTOA for this.

Use FIND in the focalpoint forum to find other questions and solutions on this issue.

have a nice day....




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Gold member
posted Hide Post
Frank,
I need it in other way around. If the column data has 0 then the column should display N/A, else i need to get the calculation of the define.

Regards


Dev:
Dev Studio 7.1.6,Report Caster 7.1.1,Servlet
Local:
Dev Studio 7.1.6,Report Caster 7.1.1,Apache 5.0.2,
Win XP


 
Posts: 80 | Registered: March 21, 2007Report This Post
Virtuoso
posted Hide Post
Try a DEFINE:
SET NODATA='N/A'
DEFINE FILE Fn
miss_field/D12.2 MISSING ON = IF field EQ 0 THEN MISSING ELSE field;
calc_field/D12.2 MISSING ON = calculation on miss_field; 
END
TABLE FILE Fn
PRINT field miss-field calc_field
.
.
END


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Convert Alpha to Number and Store in a numeric field - possible???

Copyright © 1996-2020 Information Builders