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] Ignore alpha string

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Ignore alpha string
 Login/Join
 
Master
posted
I have a field called PCDOCNUM/A6.
It contains values like '00369' and
'85323' as well as 'ALL' or 'WILSON'.

I cannot find a sample, nor remember how I would accept only those values that are
numeric across the entire string.

How could this be done without coding a very large WHERE statement? Frowner

Thanks!

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


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 573 | Location: Baltimore, MD | Registered: July 06, 2006Report This Post
Expert
posted Hide Post
Tom,

I don't know what release of 7.6 you are running but there is a new function called PATTERN in 7.6.5 (pg. 76 of the SofNF for 765) which might be helpful.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Expert
posted Hide Post
SOOOOOOO cool! thanks Ginny




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
<JG>
posted
No need to wait for 765

CHKFMT function has been there for ever (almost)
 
Report This Post
Virtuoso
posted Hide Post
But, if you have a leading or trailing space in your alpha field that is otherwise totally numeric, CHKFMT returns a 1 - stating it is not numeric - which is in this case not correct.
You could solve that by using a combination of EDIT and CHKFMT. If the result of the EDIT is 0 and the result of CHKFMT is also 0 then it is definitely not a numeric contents.
The following example show that:
FILEDEF MFD DISK mfd1.mas
-RUN
-WRITE MFD FILENAME=MFD1, SUFFIX=FIX, $
-WRITE MFD SEGNAME=MFD1, $
-WRITE MFD FIELDNAME=COL1 , FORMAT=A6   , ACTUAL=A6, $

FILEDEF MFD1 DISK mfd1.ftm
-RUN
-WRITE MFD1 123456
-WRITE MFD1 all
-WRITE MFD1   9900
-WRITE MFD1 wilson
-WRITE MFD1 000000
-WRITE MFD1   44
-WRITE MFD1 this

TABLE FILE mfd1
PRINT COL1
      COMPUTE COL2/I6 = EDIT(COL1);
      COMPUTE COL3/I6 = CHKFMT(6, COL1, '999999', COL3)
END

Hope this helps ...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Master
posted Hide Post
Thanks all for your replies. Nice Thread

Ginny,

I tried the PATTERN function and it worked like a jewel! Good One

Thanks,
Tom


Tomsweb
WebFOCUS 8.1.05M, 8.2.x
APP Studio, Developer Studio, InfoAssist, Dashboards, charts & reports
Apache Tomcat/8.0.36
 
Posts: 573 | Location: Baltimore, MD | Registered: July 06, 2006Report This Post
Virtuoso
posted Hide Post
Tom will you edit your Subject line and put [SOLVED]?

Thanks
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Expert
posted Hide Post
Cross reference to : http://forums.informationbuild...1057331/m/7627090276

I added that URL just to make it easy for the next time anyone needs this.
 
Posts: 3132 | Location: Tennessee, Nashville area | Registered: February 23, 2005Report 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] Ignore alpha string

Copyright © 1996-2020 Information Builders