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 Check a Field is not in Table?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] How to Check a Field is not in Table?
 Login/Join
 
Member
posted
Hi,

Is there a simple way to check if one field is in the table or not?

For example, during the process of fex program, we want to check in webfocus code to see if one field is already exist or not.

Thanks,
William Zhu

This message has been edited. Last edited by: William Zhu,


webfocus 5.3
WebFOCUS 7.1.x
WebFOCUS 7.6.x
WebFOCUS 7.7.x
Unix
Excel / HTML / PDF
 
Posts: 17 | Registered: February 06, 2009Report This Post
Expert
posted Hide Post
Do you want to know whether the field has data in it or do you want to know whether the master has that field name in it?

For the former, you could check for MISSING if it is a relational table.

For the latter, you can do a CHECK FILE mastername HOLD and then TABLE FILE HOLD PRINT FIELDNAME WHERE FIELDNAME EQ 'XXXXXXX';

Let us know.


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
Member
posted Hide Post
I mean the latter, to know whether the master has that field name in it?

The way you mentioned is also the way that I only know.

I don't know if there is a more simple way to know whether the master or hold file has one field name in it?

Thanks,


webfocus 5.3
WebFOCUS 7.1.x
WebFOCUS 7.6.x
WebFOCUS 7.7.x
Unix
Excel / HTML / PDF
 
Posts: 17 | Registered: February 06, 2009Report This Post
Expert
posted Hide Post
That's a pretty easy way. I'd stick with it.


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
There are some very interesting Masters in C:\ibi\srv76\home\catalog that refer to Fexes and Masters

Here's another way to determine if a field exists in a table:

TABLE FILE SYSCOLUM
PRINT 
NAME
WHERE TBNAME EQ 'CAR'
WHERE NAME EQ 'SALES' OR ALIAS EQ 'SALES' 
ON TABLE HOLD
END
-RUN

-IF &LINES EQ 0 GOTO BYPASS1

-TYPE YEAH! SALES EXISTS 

-BYPASS1


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
Master
posted Hide Post
You can always do a
?F filename to see what fields are in a master
or ?FF filename if you also need the field formats


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Report This Post
Expert
posted Hide Post
The way Ginny suggests is the way we've all been doing it for ages,
which prompted Noreen to do a webinar the other day called 'Betcha didn't know...' and it introduced us to SYSCOLUM, the way Francis suggests. Which of course, he already knew about. If you're just doing a live check, then ?FF is the way, as PB says.




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
Member
posted Hide Post
The problem is resolved.

Thanks for everyone's suggestions.

This is the best tech forum I have ever used.


webfocus 5.3
WebFOCUS 7.1.x
WebFOCUS 7.6.x
WebFOCUS 7.7.x
Unix
Excel / HTML / PDF
 
Posts: 17 | Registered: February 06, 2009Report 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 Check a Field is not in Table?

Copyright © 1996-2020 Information Builders