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     Difference between define field, computed field, group field

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Difference between define field, computed field, group field
 Login/Join
 
Silver Member
posted
Hi,
In Master File (.mas), you are allowed to add the following
1. new define field
2. new computed field
3. new group field.

What is the difference in each one of them?

Thanks
 
Posts: 43 | Registered: August 09, 2007Report This Post
Virtuoso
posted Hide Post
this will answer your first 2.

https://forums.informationbuilders.com/eve/forums/a/tpc/...411098331#6411098331


In Focus since 1993. WebFOCUS 7.7.03 Win 2003
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Expert
posted Hide Post
I don't think you can add a COMPUTE field to a Master.


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

1. You can add a COMPUTE field to Master File by opening the .mas file in the editor, selecting the segment name and right click on segment name. It gives you the option to add a Define field, Compute field, Groupd field.

Thks
 
Posts: 43 | Registered: August 09, 2007Report This Post
Expert
posted Hide Post
Kar,

Thanks for the update. It must be a new feature post 5.3.2.

This is the Master File Tool in Dev Studio 5.3.2:


The three field possibilities are (buttons highlighted in red): New field, New defined field and New group field.

Defined fields are "Virtual fields" created for every row in the related segment.

I am not sure what a Computed field would mean in a Master.

As fas as I know, Group fields cannot be created for RDBMS tables, which is what I work with almost exclusively.

Here is an example of a Group field in a VSAM file, you need Group fields when the VSAM key is made up of multiple fields:

FILENAME = NSORDERS, SUFFIX=VSAM, $       NEW STORE ORDERS FILE

SEGMENT = NSORDERS, SEGTYPE=S3, $
  GROUP=NSO_KEY,  ALIAS=KEY  ,USAGE=A21,  ACTUAL=A21, $
    FIELD=STORE     , ,       USAGE=A03,  ACTUAL=A03, $
    FIELD=SKU       , ,       USAGE=A08,  ACTUAL=A08, $
    FIELD=ALLOC_NBR , ,       USAGE=A10,  ACTUAL=A10, $
  FIELD=PUR_ORD_NO  , ,       USAGE=A10,  ACTUAL=A10, $
  FIELD=GROUP       , ,       USAGE=A01,  ACTUAL=A01, $
  FIELD=DEPT        , ,       USAGE=A04,  ACTUAL=A04, $
  FIELD=SUBCLASS    , ,       USAGE=A04,  ACTUAL=A04, $
  FIELD=DATA_1      , ,       USAGE=A132, ACTUAL=A132,$
  FIELD=DATA_2      , ,       USAGE=A132, ACTUAL=A132,$


Group fields are also used in SOAP Masters (Web Services):

FILENAME=M6ILO, SUFFIX=SOAP    , $
  SEGMENT=ROOT, SEGTYPE=S0, $
   GROUP=DSCCALL, ALIAS=DSCCALL, USAGE=A150, ACTUAL=A150, $
    FIELDNAME=PARM1, ALIAS=Parm1, USAGE=A30, ACTUAL=A30, $
    FIELDNAME=PARM2, ALIAS=Parm2, USAGE=A30, ACTUAL=A30, $
    FIELDNAME=PARM3, ALIAS=Parm3, USAGE=A30, ACTUAL=A30, $
    FIELDNAME=PARM4, ALIAS=Parm4, USAGE=A30, ACTUAL=A30, $
    FIELDNAME=PARM5, ALIAS=Parm5, USAGE=A30, ACTUAL=A30, $
    FIELDNAME=__RESPONSE, USAGE=TX80, ACTUAL=TX, $
  SEGMENT=RESPONSE, SEGTYPE=S0, SEGSUF=XML     , PARENT=ROOT, POSITION=__RESPONSE, $
    FIELDNAME=RESPONSE, ALIAS=DSCCALLResponse, USAGE=A1, ACTUAL=A1, $
    FIELDNAME=RPCOUT, ALIAS=RPCOut, USAGE=A30, ACTUAL=A30,
      REFERENCE=RESPONSE, PROPERTY=ELEMENT,  $
    FIELDNAME=STATUS, ALIAS=status, USAGE=A30, ACTUAL=A30,
      REFERENCE=RESPONSE, PROPERTY=ATTRIBUTE,  $
    FIELDNAME=REASON, ALIAS=reason, USAGE=A30, ACTUAL=A30,
      REFERENCE=RESPONSE, PROPERTY=ATTRIBUTE,  $
    FIELDNAME=CID, ALIAS=cid, USAGE=A30, ACTUAL=A30,
      REFERENCE=RESPONSE, PROPERTY=ATTRIBUTE,  $
  SEGMENT=RECORD, SEGTYPE=S0, PARENT=RESPONSE, $
    FIELDNAME=RECORD, ALIAS=record, USAGE=A30, ACTUAL=A30,
      REFERENCE=RESPONSE, PROPERTY=ELEMENT,  $


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
Thanks Francis,
I found some details on group field in master file

You can assign a unique name to multiple fields to create a group field. A group field is created by two or more alphanumeric fields, physically next to each other. A group field provides an efficient means for grouping similar or logically connected fields that will be accessed as a single unit, but do not warrant a separate segment.
 
Posts: 43 | Registered: August 09, 2007Report This Post
Silver Member
posted Hide Post
quote:
Originally posted by Kar:
Hi Francis,

1. You can add a COMPUTE field to Master File by opening the .mas file in the editor, selecting the segment name and right click on segment name. It gives you the option to add a Define field, Compute field, Groupd field.

Thks



I am using version 7.1 and I dont see Add compute field either


Madhu

WF Version 7.1 Windows, SQL Server Database
 
Posts: 36 | Location: Mississauga, Ontario | Registered: April 12, 2007Report This Post
Platinum Member
posted Hide Post
We've used DEFINEd fields in lots of MFD that reference ORACLE and MS/SQL tables.
After WebFOCUS receives each each table row from the DBMS, it adds and evaluates the DEFINEd fields. The DEFINEs exist only in the buffer area FOCUS uses to hold records passed to it from the DBMS. I don't see why COMPUTEs wouldn't be handled in the same way. DEFINE and COMPUTEs in the MFD differ only in the method used and time at which their value is determined.


WIN/2K running WF 7.6.4
Development via DevStudio 7.6.4, MRE, TextEditor.
Data is Oracle, MS-SQL.
 
Posts: 154 | Location: NY | Registered: October 27, 2005Report This Post
Expert
posted Hide Post
Since I don't have WF 7, I'd love someone to post a Master that has a COMPUTE in it. I just cannot see how a COMPUTE would work in a Master, since COMPUTEs are evaluated after the data is aggregated and a Master describes the non-aggregated data.


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
This feature is available in Version 7 Release 1.3 and higher.
Computed fields that are created from the Master File are available in the fields lists of
the Report Painter. This kind of computed field is identified as the Master File Computed
Field and is differentiated from the Defined fields and the other Computed fields.
You can use a computed field:
❏ As a BY sort field. The BY sort is automatically converted to a TOTAL field since
calculated values are calculated after data has been sorted and aggregated, but
before the report is displayed. Since sorting (BY) has already been done, the phrase
BY TOTAL is used to indicate that this sort is performed after any BY sorting. This
applies to calculated values from the Master File and temporary calculated values.
❏ In a WHERE TOTAL statement. When you use calculated values for selection
criteria, the WHERE is automatically converted to WHERE TOTAL. This occurs because
the WHERE TOTAL is added after the data is retrieved and sorted, but before the
report is finalized. This applies to selection criteria created with calculated values
from the Master File and temporary calculated values.
❏ As a SUM or DETAIL field.


ttfn, kp


Access to most releases from R52x, on multiple platforms.
 
Posts: 346 | Location: Melbourne Australia | Registered: April 15, 2003Report This Post
Platinum Member
posted Hide Post
As for when DEFINE and computes are evaluated ...
When TABLE can, it will ship the define expression to the SQL engine. But logically, the answer is the same. Computes are never shipped to the DBMS engine (though parts of compute can be --- SUM.flda + SUM.fldb the summing can be shipped). Computes are evaluated AFTER all the summing has happened (at the same time WHERE TOTAL is evaluated).


Brian Suter
VP WebFOCUS Product Development
 
Posts: 200 | Location: NYC | Registered: January 02, 2007Report This Post
Expert
posted Hide Post
Piipster, thank you for the information regarding COMPUT in Master.


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

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Difference between define field, computed field, group field

Copyright © 1996-2020 Information Builders