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] COMPARISON BETWEEN COMPUTATIONAL AND ALPHA VALUES IS NOT ALLOWED

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] COMPARISON BETWEEN COMPUTATIONAL AND ALPHA VALUES IS NOT ALLOWED
 Login/Join
 
Gold member
posted
Hello, I have the following code in my report.

SET ASNAMES = ON
SET HOLDLIST=PRINTONLY

DEFINE FILE VUSER_ROUTING_CODES_AND_LIMITS
NEWDOLLARLIMIT/P20 = EDIT(DOLLAR_LIMIT)
END

TABLE FILE VUSER_ROUTING_CODES_AND_LIMITS
PRINT
VUSER_ROUTING_CODES_AND_LIMITS.VUSER_ROUTING_CODES_AND_LIMITS.TO_USER AS 'USER'
VUSER_ROUTING_CODES_AND_LIMITS.VUSER_ROUTING_CODES_AND_LIMITS.JOB_GROUP
VUSER_ROUTING_CODES_AND_LIMITS.VUSER_ROUTING_CODES_AND_LIMITS.NEWDOLLARLIMIT
BY VUSER_ROUTING_CODES_AND_LIMITS.VUSER_ROUTING_CODES_AND_LIMITS.JOB_GROUP NOPRINT
BY VUSER_ROUTING_CODES_AND_LIMITS.VUSER_ROUTING_CODES_AND_LIMITS.NEWDOLLARLIMIT NOPRINT
ON TABLE HOLD AS LIMIT FORMAT FOCUS
END

TABLE FILE LIMIT
SUM MAX.JOB_GROUP AS 'JOB_GROUP'
USER
COMPUTE NEWDOLLAR/A16='>'||NEWDOLLARLIMIT; AS 'DOLLAR_LIMIT'
BY JOB_GROUP NOPRINT
END  


When I run this code I get the following error:


(FOC280) COMPARISON BETWEEN COMPUTATIONAL AND ALPHA VALUES IS NOT ALLOWED

If I comment the line

COMPUTE NEWDOLLAR/A16='>'||NEWDOLLARLIMIT; AS 'DOLLAR_LIMIT'

I don't get any errors. I need that line so that I can insert the > sign in front of the dollar limit.

What am I doing wrong.

Also the reason I have the DEFINE field 'NEWDOLLARLIMIT/P20 = EDIT(DOLLAR_LIMIT) so that the sorting are based on dollar amount low to high. Without it the sorting was not working.

Please help.

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


WebFOCUS 7.6.9
Windows 2003
HTML, Plain Text
 
Posts: 96 | Registered: March 15, 2010Report This Post
<JG>
posted
quote:
What am I doing wrong.

Everything.

You can not use a numeric field in a concaternation. Simple rule Alpha only.

Your issue is the sort order.

Your solution

Concaternate the alpha columns

Sort on the numeric column using the NOPRINT option.
 
Report This Post
Silver Member
posted Hide Post
quote:
Originally posted by kpiracha:
Hello, I have the following code in my report.

SET ASNAMES = ON
SET HOLDLIST=PRINTONLY

DEFINE FILE VUSER_ROUTING_CODES_AND_LIMITS
NEWDOLLARLIMIT/P20 = EDIT(DOLLAR_LIMIT)
END

TABLE FILE VUSER_ROUTING_CODES_AND_LIMITS
PRINT
VUSER_ROUTING_CODES_AND_LIMITS.VUSER_ROUTING_CODES_AND_LIMITS.TO_USER AS 'USER'
VUSER_ROUTING_CODES_AND_LIMITS.VUSER_ROUTING_CODES_AND_LIMITS.JOB_GROUP
VUSER_ROUTING_CODES_AND_LIMITS.VUSER_ROUTING_CODES_AND_LIMITS.NEWDOLLARLIMIT
BY VUSER_ROUTING_CODES_AND_LIMITS.VUSER_ROUTING_CODES_AND_LIMITS.JOB_GROUP NOPRINT
BY VUSER_ROUTING_CODES_AND_LIMITS.VUSER_ROUTING_CODES_AND_LIMITS.NEWDOLLARLIMIT NOPRINT
ON TABLE HOLD AS LIMIT FORMAT FOCUS
END

TABLE FILE LIMIT
SUM MAX.JOB_GROUP AS 'JOB_GROUP'
USER
COMPUTE NEWDOLLAR/A16='>'||NEWDOLLARLIMIT; AS 'DOLLAR_LIMIT'
BY JOB_GROUP NOPRINT
END  


When I run this code I get the following error:


(FOC280) COMPARISON BETWEEN COMPUTATIONAL AND ALPHA VALUES IS NOT ALLOWED

If I comment the line

COMPUTE NEWDOLLAR/A16='>'||NEWDOLLARLIMIT; AS 'DOLLAR_LIMIT'

I don't get any errors. I need that line so that I can insert the > sign in front of the dollar limit.

What am I doing wrong.

Also the reason I have the DEFINE field 'NEWDOLLARLIMIT/P20 = EDIT(DOLLAR_LIMIT) so that the sorting are based on dollar amount low to high. Without it the sorting was not working.

Please help.


 DEFINE FILE CAR
NCOST/A17 = FTOA(RETAIL_COST,'(D7)','A17') ;
ALPHA_COST/A20 = '> ' || NCOST ;
END
TABLE FILE CAR
SUM ALPHA_COST AS 'RETAIL,COST'
    MODEL
BY HIGHEST RETAIL_COST NOPRINT
END 


7.7.04
Win2K3, Unix
Oracle 10G,SQL2K,XFOCUS,ESRI,BID,MRE,SELF-SERVICCE
 
Posts: 36 | Location: Melville,NY | Registered: August 09, 2004Report This Post
<JG>
posted
I thought that's what I just said.

quote:

There is really only one way to learn how to do something and that is to do it.

quote:
Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
 
Report This Post
Expert
posted Hide Post
kpiracha, as shown above, this is normal operation of WebFOCUS. strings can only be concatenated to strings. Numerics can only be used with numerics. all other caes need a conversion.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
Everyone was right on the money. You guys have done it again. Thanks for all your help.


WebFOCUS 7.6.9
Windows 2003
HTML, Plain Text
 
Posts: 96 | Registered: March 15, 2010Report 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] COMPARISON BETWEEN COMPUTATIONAL AND ALPHA VALUES IS NOT ALLOWED

Copyright © 1996-2020 Information Builders