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     WHERE DID MY CODE GO?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
WHERE DID MY CODE GO?
 Login/Join
 
Master
posted
I finally got some code running to report a dept by day and a running total of: 'units' which would reset itself when the dept changes. To be honest i am not even sure why the code works...but thats a minor issue at this point.

I was working in Source/text view in Webfocus 7703. I start a new procedure, go right to text mode, paste in the code below, run it..looks great btw, then save and go to physical view and Poof! the compute for the running total is gone..Kaput...no where to be found.

I had a coworker try it...same thing...what the heck is going on!

TABLE FILE ANALYZER_INVOICE_VW
BY LOWEST ANALYZER_INVOICE_VW.INVOICE.Billing_Area_ReportingNum AS 'BaNbr'
BY LOWEST ANALYZER_INVOICE_VW.TRANSACTION.TRX_PostingDt
BY LOWEST COMPUTE RUNNING_TOTAL_UNITS_ACT/D12.2 = IF ANALYZER_INVOICE_VW.INVOICE.Billing_Area_ReportingNum EQ LAST ANALYZER_INVOICE_VW.INVOICE.Billing_Area_ReportingNum THEN ( LAST RUNNING_TOTAL_UNITS_ACT + ANALYZER_INVOICE_VW.CPTCODES.Units )ELSE ANALYZER_INVOICE_VW.CPTCODES.Units; AS 'UnitsRnng'
WHERE ANALYZER_INVOICE_VW.TRANSACTION.TRX_PostingDt_Period EQ 201307;
ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET BYDISPLAY ON
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = endeflt,
$
ENDSTYLE
END


WebFOCUS 8206.08
Windows, All Outputs
 
Posts: 603 | Registered: June 28, 2013Report This Post
Expert
posted Hide Post
The BY LOWEST COMPUTE is not recognized by the GUI.

Something as simple as this works as code:

TABLE FILE CAR
SUM
SALES
BY LOWEST COUNTRY
BY LOWEST COMPUTE SEATSN/I5 = SEATS + 1; AS SEATS
END


and gets converted to this in the GUI:

TABLE FILE CAR
SUM 
     CAR.BODY.SALES
BY  LOWEST CAR.ORIGIN.COUNTRY
ON TABLE NOTOTAL
END

and I've never used COMPUTE in a BY statement, and I've been at it a long time...


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
Virtuoso
posted Hide Post
I've found the GUI also blithely converts WRITE (which remains a valid synonym for SUM*) to PRINT (which is a horse of a rather different color).

-jg


    *Syntax: How to Use Display Commands in a Request

    display [THE] [SEG.]fieldname1 [AND] [THE] fieldname2 ...

    or
    display *

    where:

    display
    Is the PRINT, LIST, SUM, or COUNT command. WRITE and ADD are synonyms of SUM and can be substituted for it.

    . . .
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Virtuoso
posted Hide Post
Notes:

I was aware that "AND" is accepted as a noise word (I kinda like the sound of "AND COMPUTE ..."); but "THE" was news to me.

A simple means to indent a portion of a post is to place it within an empty list ([ LIST ] ... [ /LIST ] with no [ * ] list-item codes)
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Expert
posted Hide Post
Hmmm...

DEFINE FILE CAR
THEODORE/A10 = 'HELLO';
ANDREW/A10 = 'GOODBYE';
END

TABLE FILE CAR
PRINT
THE SEATS
AND
THE MODEL
BY COUNTRY
END


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
Francic,
thanks! I am new at all this. I think I lack of understanding as to when to use the SUM/PRINT/BY.

The code above (BY COMPUTE) yeilds a running total...I could not get it to work any other way. Open to advise!

I started over and created the same compute within the GUI and now it all works....when I toggle between text and gui and no longer disappears...the GUI altered the code a bit from what I originally had...looks like a 'TOTAL' is now in there...

TABLE FILE ANALYZER_INVOICE_VW
BY LOWEST ANALYZER_INVOICE_VW.INVOICE.Billing_Area_ReportingNum AS 'BaNbr'
BY LOWEST ANALYZER_INVOICE_VW.INVOICE.Billing_Area_ReportingName AS 'BaName'
BY LOWEST ANALYZER_INVOICE_VW.TRANSACTION.TRX_PostingDt_Period AS 'PD'
BY LOWEST ANALYZER_INVOICE_VW.TRANSACTION.TRX_PostingDt

BY TOTAL LOWEST COMPUTE RUNNING_TOTAL_UNITS_ACT/D12.2 = IF ANALYZER_INVOICE_VW.INVOICE.Billing_Area_ReportingNum EQ LAST ANALYZER_INVOICE_VW.INVOICE.Billing_Area_ReportingNum THEN ANALYZER_INVOICE_VW.CPTCODES.UNITS + LAST RUNNING_TOTAL_UNITS_ACT ELSE ANALYZER_INVOICE_VW.CPTCODES.UNITS;

WHERE ANALYZER_INVOICE_VW.TRANSACTION.TRX_PostingDt_Period EQ '201307';

ON TABLE SET PAGE-NUM NOLEAD
ON TABLE SET BYDISPLAY ON
ON TABLE NOTOTAL
ON TABLE HOLD AS RNNGTOTALSACT FORMAT ALPHA
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
INCLUDE = endeflt,
$
ENDSTYLE
END


WebFOCUS 8206.08
Windows, All Outputs
 
Posts: 603 | Registered: June 28, 2013Report 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     WHERE DID MY CODE GO?

Copyright © 1996-2020 Information Builders