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] Weird behaviour in WF 7.6

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Weird behaviour in WF 7.6
 Login/Join
 
Silver Member
posted
Hello I noticed something that troubles me ( maybe it's not a bug but I am not aware of the situation ). I have a define block with some new virtual fields defined but it seems that when I try to print some of them they are not printed correctly unless I print the other defined fields on which they depend.
Here is a snippet of the code:

DEFINE FILE TABL1
col1_V1/D15.3 = col1_V1 + some_table_col1;
col_new/D15.3 = col1_V1;
col1_V1/D15.3 = IF some_ather_col NE LAST some_other_col THEN 0 ELSE col1_V1;
END
-RUN

TABLE FILE TABLE1
PRINT col1_new
END
-RUN

LET'S say I have two columns in table1 then the result is something like:
col1_new
--------
-200,000
.000

When I print col1_V1 with NOPRINT:

TABLE FILE TABLE1
PRINT
col_V1 NOPRINT
col1_new
END
-RUN

then there is no problem and col1_new prints as expected:

col1_new
--------
-200,000
200,000

( I use then col1_new in a subfoot )

So why is this happening ?!?
Thanks in advance.

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


WF 7.6.5 / OS: XP / FOCUS
 
Posts: 42 | Registered: September 01, 2008Report This Post
<JG>
posted
AS it appears to be such a simple request

Create a repro against the car database, that way we can all play with it in the various versions
of 76 that are available.

Not knowing what the 76(X) X bit is means you could be on anything from 7.6.0 to 7.6.7

Also XP is not a WebFocus platform it's for Dev Studio only.
Is this just Dev Studio or do you have a server hiding some where?
 
Report This Post
Silver Member
posted Hide Post
Here is the example with the CAR table ( the same strange behaviour - or at least strange to me Smiler )

DEFINE FILE CAR
WIDTH_T1/D6 = WIDTH_T1+WIDTH;
TEMPVAR/D6 = WIDTH_T1;
WIDTH_T1/D6 = IF MODEL NE LAST MODEL THEN 0 ELSE WIDTH_T1;
END
-RUN

TABLE FILE CAR
PRINT
TEMPVAR
WIDTH_T1 NOPRINT
END
-RUN
-EXIT


Try printing it without WIDTH_T1 NOPRINT and you'll see that different result prints for TEMPVAR . ( I am using WF 7.6.5 )
I am using the Dev Studio under XP.

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


WF 7.6.5 / OS: XP / FOCUS
 
Posts: 42 | Registered: September 01, 2008Report This Post
<JG>
posted
It is showing exactly the correct behaviour.

By using WIDTH_T1 NOPRINT it causes WIDTH_T1/D6 = IF MODEL NE LAST MODEL THEN 0 ELSE WIDTH_T1; to be processed
This sets WIDTH_T1 back to 0 for every new row.

Because it is created in a DEFINE and not a compute, not referencing WIDTH_T1 in the request
means that the calculation is never performed and so WIDTH_T1 does not get set back to 0.

Each new output row is then EQ to the last value of WIDTH_T1 + the value of the new input row.
 
Report This Post
Master
posted Hide Post
JG is correct

NOPRINT means a field is included in the report generation but excluded when report is displayed to screen.

To achieve the behaviour you want is to effectively comment the field out.



Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo
 
Posts: 888 | Location: Airstrip One | Registered: October 06, 2006Report This Post
Silver Member
posted Hide Post
I see - hammo you probably meant that I should leave the field with NOPRINT. Because my purpose is to print the TEMPVAR field but when MODEL changes WIDTH_T1 is set to 0 ( and TEMPVAR preserves the value of WIDTH_T1 to be used later).
Thanks both for the response.


WF 7.6.5 / OS: XP / FOCUS
 
Posts: 42 | Registered: September 01, 2008Report This Post
Member
posted Hide Post
I am wondering, is there a way to force WF (maybe by an option) to compute all the fields that are created in a define, so that we avoid using NOPRINT?


WebFOCUS 7.6, Windows XP, Output: HTML, PDF
 
Posts: 4 | Registered: August 22, 2008Report This Post
<JG>
posted
Think about things logically and reverse the order of the defined columns

DEFINE FILE CAR
WIDTH_T1/D6 = IF MODEL NE LAST MODEL THEN 0 ELSE WIDTH_T1;
WIDTH_T1/D6 = WIDTH_T1+WIDTH;
TEMPVAR/D6 = WIDTH_T1;
END
-RUN
TABLE FILE CAR
PRINT
TEMPVAR
END
-RUN

That actually does what you want in this instance

Using model as the change column is actually a bad choice because there is
only 1 row in the data for MODEL.

Use COUNTRY instead and you see the effect which I believe is required which
is to give a running total based on doing a print
 
Report This Post
Silver Member
posted Hide Post
It was a more complicated situation but your suggestion applied perfectly Smiler Thanks JG.


WF 7.6.5 / OS: XP / FOCUS
 
Posts: 42 | Registered: September 01, 2008Report 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] Weird behaviour in WF 7.6

Copyright © 1996-2020 Information Builders