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     Existence of a field in a master file

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Existence of a field in a master file
 Login/Join
 
Guru
posted
Hi,

Is there a way to test the existence of a field in the master file prior to do any calculation on it?

Thanks for any suggestion


WebFocus 7.6.5
AND WebLogic server as web server
sql2005 as database server
 
Posts: 273 | Location: Europe | Registered: May 31, 2007Report This Post
Expert
posted Hide Post
Majid,

Are you talking about whether the field has any data or whether the column exists in the master file description? Please clariy.

For the latter, you can do a CHECK FILE filename HOLD, then TABLE the hold file and do a WHERE FIELDNAME eq 'yourfield' and check &LINES.


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
CHECK FILE CAR HOLD
TABLE FILE HOLD
PRINT *
WHERE FIELDNAME EQ 'MODEL'
ON TABLE HOLD
END
-RUN

-SET &MSG = 
-  IF &LINES EQ 1 THEN 'FILE CAR CONTAINS A COLUMN CALLED MODEL' 
-  ELSE 'CAR DOES NOT CONTAIN A COLUMN CALLED MODEL';

-TYPE &MSG


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
Hi Francis and Ginny,

Thanks to both of your answers are the same.
But there is no other way without tabling.

Thanks again


WebFocus 7.6.5
AND WebLogic server as web server
sql2005 as database server
 
Posts: 273 | Location: Europe | Registered: May 31, 2007Report This Post
Guru
posted Hide Post
Can you look in the filename.mas ? This will at least tell you if the field is in the file/table/whatever.


WF 7.6.11
Oracle
WebSphere
Windows NT-5.2 x86 32bit
 
Posts: 398 | Registered: February 04, 2008Report This Post
Master
posted Hide Post
Are you meaning to test if the field is null? or in the MFD?


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
Guru
posted Hide Post
Hi PBrightwell

I wanted to test the existence of field in a master file.

Regards


WebFocus 7.6.5
AND WebLogic server as web server
sql2005 as database server
 
Posts: 273 | Location: Europe | Registered: May 31, 2007Report This Post
Master
posted Hide Post
Try IF MISSING.


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
Majid,

The answer has already been given, but to assist you in understanding it -

You are in a room.
There is a bucket filled with water in the middle of that room.
You want to know if it has any fish in it.
How are you going to find out?

You have to look in it!!

To find the field visually, open the MFD in a viewer.
Programatically, then use the solution suggested by Ginny and then given away by Francis.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Guru
posted Hide Post
Tony,

I understood it from the post of Francis and I implemented it.
I do not nderstand what you are trying to say.

Regards


WebFocus 7.6.5
AND WebLogic server as web server
sql2005 as database server
 
Posts: 273 | Location: Europe | Registered: May 31, 2007Report This Post
Expert
posted Hide Post
T,

You could keep your eyes closed and swallow - if something slippery went down your gullet, then, most likely it was a fish.

F.
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Master
posted Hide Post
Majid,
I think you are asking the question wrong. If you want to know if the field is in the Master File, open the Master file and look. If you want to know if there is data in that field, try
COMPUTE ANYAMT/D10=IF DATAFIELD IS MISSING THEN O ELSE DATAFIELD *10;


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
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Existence of a field in a master file

Copyright © 1996-2020 Information Builders