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.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED]How to compare percent values in if statement

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]How to compare percent values in if statement
 Login/Join
 
Guru
posted
Hi,

Iam running this code and Iam trying to compare the percent values in the if statement instead Iam getting the error message as shown below:

 -SET &ECHO = ON ;

TABLE FILE CAR
PRINT
CAR
COUNTRY
MODEL
SEATS
DEALER_COST
RETAIL_COST
COMPUTE NEW_COST/D12.2%=RETAIL_COST/DEALER_COST;
COMPUTE NEW_COLUMN/A1=IF CAR EQ 'JAGUAR' AND (NEW_COST GT 1% AND NEW_COST LT 1.2%) THEN 'P' ELSE 'O';
ON TABLE SET STYLE *
TYPE =DATA,COLUMN=N8, FONT='Wingdings 2',COLOR=GREEN,STYLE=BOLD,$
TYPE =DATA,COLUMN=N8, FONT='Wingdings',COLOR=YELLOW,STYLE=BOLD,$
END
-RUN
-EXIT

0 ERROR AT OR NEAR LINE     20  IN PROCEDURE ADHOCRQ FOCEXEC *
(FOC258) FIELDNAME OR COMPUTATIONAL ELEMENT NOT RECOGNIZED: 1%
(FOC009) INCOMPLETE REQUEST STATEMENT
BYPASSING TO END OF COMMAND
 


Could anyone please let me know how to resolve this?

Thanks a lot in advance for all your help.

Regards,
IP

This message has been edited. Last edited by: info4pal,


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Report This Post
Virtuoso
posted Hide Post
NEW_COLUMN isn't a character it's a number. Try:

COMPUTE NEW_COLUMN/A1=IF CAR EQ 'JAGUAR' AND (NEW_COST GT .01 AND NEW_COST LT .12) THEN 'P' ELSE 'O';


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Guru
posted Hide Post
Hi,

Thanks a lot BabaNYC.
I Will try this out.

Regards,
IP


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Report This Post
Platinum Member
posted Hide Post
quote:
.12

You can use-
COMPUTE NEW_COLUMN/A1=IF (NEW_COST GT 1.00 AND NEW_COST LT 1.20) THEN 'P' ELSE 'O';


Thanks!
@vi

WebFOCUS 8105, Dev Studio 8105, Windows 7, ALL Outputs
 
Posts: 103 | Registered: July 08, 2013Report This Post
Guru
posted Hide Post
Hi,

Thanks a lot Avinash Smiler
I will try this out.

Regards,
IP


Webfocus 8105 Developer studio,Windows 7,HTML,Excel,PDF,Text,Infoassist,Graph,AHTML
 
Posts: 270 | Registered: October 30, 2014Report 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     [SOLVED]How to compare percent values in if statement

Copyright © 1996-2020 Information Builders