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] Why is it discouraged to use -EXIT with Report Caster?

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Why is it discouraged to use -EXIT with Report Caster?
 Login/Join
 
Virtuoso
posted
Recently we opened a case about a problematic Report Caster job and we got told to not use -EXIT in Report Caster, as it "stops all execution immediately" and to use -GOTO instead. The support desk referred us to an appendix in the RC documentation (http://documentation.informationbuilders.com/masterindex/html/html_wf_7705/wf77rcuser/wf77rcuser.pdf) that mentions several statements that we "should not use in Report Caster".

Furthermore, after asking about it some, I got explained that:
quote:

In most instances the -EXIT appears after the part of the fex that contains
the report to be distributed. Therefore, it will be distributed. Other
times it is not and the report may not be distributed. We have had customers
whose reports do not distribute. It depends up on where in the code it
appears.

-EXIT forces an exit from a procedure. However it does allow for execution
of stacked commands in the focstack. So even if the report commands are
executed and the report distributed, the tables may not update because
-EXIT stopped the execution from completing these last steps which occur
after the -EXIT. The information for -EXIT in the Core Language also
applies to WebFOCUS.


I am rather puzzled by these statements, as to me it appears that -EXIT is doing exactly what I would expect it to do: it stops execution and distributes all reports up to the statement.

Am I missing something here?
Why would IBI discourage using -EXIT (or -QUIT or FOC_NONE for that matter)?

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Expert
posted Hide Post
I think its is because the scheduled fex is wrapped in another fex that controls lots of things, so a -EXIT will just stop the processing.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Master
posted Hide Post
Waz,

sure, but WF isn't afraid to 'change' your code anyway.

If you have a fex with output format HTML. The ReportCaster still allows you to set it to distribute PDF. ( stop meddling WF! )

So they should be able to ignore the -EXIT too ( just jump to end of fex ).


_____________________
WF: 8.0.0.9 > going 8.2.0.5
 
Posts: 668 | Location: Veghel, The Netherlands | Registered: February 16, 2010Report This Post
Virtuoso
posted Hide Post
Wouldn't -EXIT just exit the wrapped procedure and continue execution in the wrapping procedure? That's what I would expect to happen.

If this is indeed a problem (which I suspect it is, since IBI warns about not doing this), how many people actually knew about this?


WebFOCUS 8.1.03, Windows 7-64/2008-64, IBM DB2/400, Oracle 11g & RDB, MS SQL-Server 2005, SAP, PostgreSQL 11, Output: HTML, PDF, Excel 2010
: Member of User Group Benelux :
 
Posts: 1669 | Location: Enschede, Netherlands | Registered: August 12, 2010Report This Post
Virtuoso
posted Hide Post
That's one of the differences between EX and -INCLUDE.

When alpha.fex invokes beta.fex via the EX command:
EX beta

a -EXIT in beta.fex will indeed return control to the next line in alpha.fex (or of the code from alpha.fex currently in FOCSTACK).

But when alpha.fex invokes beta.fex via the -INCLUDE dialog manager directive:
-INCLUDE beta

the contents of beta.fex are [I]inserted[I] into, and in effect become part of, alpha.fex -- so a -EXIT in beta.fex causes an immediate exit from alpha.fex.

The other major difference is that, with -INCLUDE, alpha.fex and beta.fex share the same 'address space" of amper variables, so the parameters received by or set in alpha.fex are automatically available to beta.fex (and conversely any set in beta.fex are available when control returns to alpha.fex); whereas, with EX, beta.fex operates in a separate, fresh amper variable "address space" (and that of alpha.fex is preserved across the invocation of beta.fex).

The need for the inner procedure to inherit the supplied parameters received by the wrapper is what dictated IBI's use of -INCLUDE in the wrapper; and that in turn occasions the restriction on -EXIT and -QUIT in the RCaster context.

This message has been edited. Last edited by: j.gross,


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Expert
posted Hide Post
I would suggest that you only use -EXIT with testing.

I think its better to have the FEX gracefully finish than to just kill it.

e.g.
{code}
-IF {condition} THEN GOTO EOP ;
{code}
-EOP
-* End of Program


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Silver Member
posted Hide Post
In earlier releases the use of -QUIT and -EXIT in scheduled procedures sometimes disrupted ReportCaster processing and hence the documentation advising the use of branching logic to go to the end of a procedure and terminate gracefully. In WebFOCUS 7.7 and WebFOCUS 8 the processing is more robust. The documentation will be reviewed and revised accordingly.


WebFOCUS All Releases
 
Posts: 45 | Location: NYC | Registered: September 21, 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     [SOLVED] Why is it discouraged to use -EXIT with Report Caster?

Copyright © 1996-2020 Information Builders