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     comparison on alpha field

Read-Only Read-Only Topic
Go
Search
Notify
Tools
comparison on alpha field
 Login/Join
 
Silver Member
posted
I'm trying to run a report breaking down pc's by the departments they are in. This is determined based upon their IP. The IP field is considered text. I have attempted to change this field to numeric in the master data file. My define is
DEPARTMENT/A10=
IF IP GE '10.100.1.31' OR LE '10.100.1.254' THEN 'PFM' ELSE
IF IP GE '10.100.9.31' OR LE '10.100.9.254' THEN 'DATA' ELSE 'OTHER';

If I do it as listed above I get the error
COMPARISON BETWEEN COMPUTATIONAL AND ALPHA VALUES IS NOT ALLOWED

If I take off the quotes around the IP address I get an error
FIELDNAME OR COMPUTATIONAL ELEMENT NOT RECOGNIZED: 10.100.1.31

Am I going to have to do a computation into binary number or something in order to do this define?
 
Posts: 45 | Registered: March 18, 2005Report This Post
Guru
posted Hide Post
Take a look at the EDIT function.
 
Posts: 406 | Location: Canada | Registered: May 31, 2004Report This Post
Guru
posted Hide Post
 
Posts: 406 | Location: Canada | Registered: May 31, 2004Report This Post
Silver Member
posted Hide Post
thank you
 
Posts: 45 | Registered: March 18, 2005Report This Post
Expert
posted Hide Post
Ginny,

You cannot change the IP address field to numeric - it has several dots in it.

Your syntax for the IF statement is incorrect.

IF IP GE '10.100.1.31' OR LE '10.100.1.254' THEN 'PFM' is wrong.

These are correct:

IF IP GE '10.100.1.31' OR IP LE '10.100.1.254' THEN 'PFM'

or

IF IP FROM '10.100.1.31' TO '10.100.1.254' THEN 'PFM'

Cheers,

Francis.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Silver Member
posted Hide Post
I'm using the Edit function and just pulling out the 3rd octect, since that's what I need. Unfortunately not all the IP's are exactly the same so my edit that says
IPADD/I2= EDIT(IP, '$$$$$$$99$$$$')
works fine for an IP that is 10.100.25.111 but doesn't work for one that is 10.1.1.154 any idea how to deal with that?
 
Posts: 45 | Registered: March 18, 2005Report This Post
Silver Member
posted Hide Post
Francis,

Your suggestion of the FROM and TO worked.

Thanks again for everyone's help
 
Posts: 45 | Registered: March 18, 2005Report This Post
Expert
posted Hide Post
I would transform the IP addresses - separate the four parts, add leading zeros, put the parts back together and then test.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Guru
posted Hide Post
You can also use the GETTOK to pull out the each part of the IP.
 
Posts: 406 | Location: Canada | Registered: May 31, 2004Report This Post
<Special-K>
posted
Also when comparing '10.100.1.31' to '10.100.1.254' remember '10.100.1.31' is GREATER than '10.100.1.254' since that is a string comparison.
 
Report 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     comparison on alpha field

Copyright © 1996-2020 Information Builders