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.
Let me start by saying I have put an error into report2 on purpose.
I'm trying to figure out how to get report1 and report3 to compound together even if report2 has an error. Or is there some way to prevent the 'No HTML Output' page from displaying?
-* File report0.fex
SET COMPOUND = OPEN
-INCLUDE report1
-INCLUDE report2
SET COMPOUND = CLOSE
-INCLUDE report3
-* File report1.fex
TABLE FILE CAR
PRINT
RETAIL_COST
DEALER_COST
BY
COUNTRY
BY
CAR
ON TABLE HOLD AS H0 FORMAT ALPHA
END
-RUN
TABLE FILE H0
SUM
RETAIL_COST
DEALER_COST
BY
COUNTRY
BY
CAR
HEADING
"REPORT 1"
ON TABLE PCHOLD FORMAT PDF
END
-RUN
-* File report2.fex
TABLE FILE CAR
PRINT
RETAIL_COST
BOB
BY
CAR
ON TABLE HOLD AS H0 FORMAT ALPHA
END
-RUN
TABLE FILE H0
SUM
RETAIL_COST
DEALER_COST
BY
CAR
HEADING
"REPORT 2"
ON TABLE PCHOLD FORMAT PDF
END
-RUN
-* File report3.fex
TABLE FILE CAR
PRINT
RETAIL_COST
DEALER_COST
BY
COUNTRY
ON TABLE HOLD AS H0 FORMAT ALPHA
END
-RUN
TABLE FILE H0
SUM
RETAIL_COST
DEALER_COST
BY
COUNTRY
HEADING
"REPORT 3"
ON TABLE PCHOLD FORMAT PDF
END
-RUN
This message has been edited. Last edited by: Kerry,
Posts: 406 | Location: Canada | Registered: May 31, 2004
The problem is that any error message returned by the system destroys the PDF output stream. What you have to do is disable the error messages using SET EMGSRV=OFF
Based on that and adding in handling to skip error sections your code becomes
SET EMGSRV=OFF -DEFAULTS &REP1='Report 1 is missing ' -DEFAULTS &REP2='Report 2 is missing ' -DEFAULTS &REP3='Report 3 is missing '
SET COMPOUND = OPEN -INCLUDE report1 -INCLUDE report2 -INCLUDE report3 SET COMPOUND = CLOSE TABLE FILE CAR "&REP1" "&REP2" "&REP3" BY COUNTRY NOPRINT ON TABLE PCHOLD FORMAT PDF END -RUN
-* File report1.fex TABLE FILE CAR PRINT RETAIL_COST DEALER_COST BY COUNTRY BY CAR ON TABLE HOLD AS H0 FORMAT ALPHA END -RUN -IF &FOCERRNUM NE 0 GOTO SKIP1; TABLE FILE H0 SUM RETAIL_COST DEALER_COST BY COUNTRY BY CAR HEADING "REPORT 1" ON TABLE PCHOLD FORMAT PDF END -RUN -SET &REP1='Report 1 contains &LINES.EVAL lines'; -SKIP1
-* File report2.fex TABLE FILE CAR PRINT RETAIL_COST BOB BY CAR ON TABLE HOLD AS H0 FORMAT ALPHA END -RUN -IF &FOCERRNUM NE 0 GOTO SKIP2; TABLE FILE H0 SUM RETAIL_COST DEALER_COST BY CAR HEADING "REPORT 2" ON TABLE PCHOLD FORMAT PDF END -RUN -SET &REP2='Report 2 contains &LINES.EVAL lines'; -SKIP2
-* File report3.fex TABLE FILE CAR PRINT RETAIL_COST DEALER_COST BY COUNTRY ON TABLE HOLD AS H0 FORMAT ALPHA END -RUN -IF &FOCERRNUM NE 0 GOTO SKIP3; TABLE FILE H0 SUM RETAIL_COST DEALER_COST BY COUNTRY HEADING "REPORT 3" ON TABLE PCHOLD FORMAT PDF END -RUN -SET &REP3='Report 3 contains &LINES.EVAL lines'; -SKIP3
Kamesh If I told you that you would know more than me.
Ok, as far as I know neither EMGSRV nor FOCERRNUM are documented as features of WebFocus anywhere.
References can be found for character based Focus or in some maintain documentation (a 52 summary of new features I think) or an old copy manager (ETL) release.
Or by searching in old hottrack cases.
It was just a couple of useful items that I acquired and use from time to time, although I sometimes forget about them.
Leah, The problem is not a genuine empty report, the problem is when WebFocus returns an error.
Under those circumstances the PDF output stream (actually it’s more probably WebFocus, because if you monitor the PDF file being built it’s not the issue) has a serious personality problem and returns nothing. It seems not to be able to recover from the error which it does quite successfully in other circumstances, (that also can be a pain if not accommodated).
I must still have my brain on standard time. I did a search on the EMGSRV in IB documentation and the only place that came back was 'maintain' but did list a group of ones that could be used with SET.
Leah
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004
(sys.) calls in Maintain invoke the WebFocus Server standard SET capabilities as well as operating system calls.
Maintain specialist please correct me if I am being over simple.
If a sys call is valid in Maintain then theoretically it should be valid in WebFocus.
IBI have made great strides to enhance the documentation to add those unknown items that should be documented. But those who have being using the tool in it various incantations and platform variants for a very long time have a legacy that sometimes is very useful but also sometimes counter productive. You either grow with it, or you go to work with something else.
A great topic for the forum or better the user groups (even better for the user conference) would be:
The really helpful things that we forgot to tell you, (there are several individuals in New York that could give you a superb hour on that subject).
While EMGSRV is listed in the Maintain doc, it is not a Maintain command. The options listed there are the settings that you can change from inside a Maintain applicaion with the sys_mgr.focset command.
This command is needed since you cannot have non-Maintain commands, like SET or dialogue manager, in a Maintain application.
Posts: 663 | Location: New York | Registered: May 08, 2003
We have received a similar documentation request for additional information on EMGSRV. We plan to add the following information to the chapter dedicated on set commands in the next release:
SET EMGSRV= {ON / OFF / GUI}
When set to OFF: The message will be suppressed.
When set to ON: The message will go to the Console Window if the Console is open, or it will go to the Pop-Up Box if the Console Window is closed.
When set to GUI: The same as ON but the message will always display in a Pop-Up Box regardless of if the Console Window is opened or closed.
As part of our ongoing efforts to produce effective documentation, the Documentation Services staff welcomes your comments regarding our documentation. Please use the Documentation Feedback Request Form to relay your suggestions for improving our products or to alert us to any additions or corrections.
“(sys.) calls in Maintain invoke the WebFocus Server standard SET capabilities as well as operating system calls. Maintain specialist please correct me if I am being over simple. If a sys. call is valid in Maintain then theoretically it should be valid in WebFocus.”
There are several undocumented features in WebFocus/Focus that might be published to everyone’s benefit.
The Dialogue Manager variables are documented in the Developing Reporting Applications manual.
&FOCERRNUM
Indicates the last error number, in the format FOCnnnn, displayed after the execution of a procedure. If more than one occurred, &FOCERRNUM holds the number of the most recent error. If no error occurred, &FOCERRNUM has a value of 0. This value can be passed to the operating system with the line ‑QUIT FOCUS &FOCERRNUM. It can also be used to control branching from a procedure to execute an error‑handling routine.
The Dialogue Manager variables are documented in the Developing Reporting Applications manual.
&FOCERRNUM
Indicates the last error number, in the format FOCnnnn, displayed after the execution of a procedure. If more than one occurred, &FOCERRNUM holds the number of the most recent error. If no error occurred, &FOCERRNUM has a value of 0. This value can be passed to the operating system with the line ‑QUIT FOCUS &FOCERRNUM. It can also be used to control branching from a procedure to execute an error‑handling routine.
Hope this helps.
-Jenn
what happens if you get something like this:
-RUN 0 ERROR AT OR NEAR LINE 421 IN PROCEDURE app_file_select (FOC004) THE OPTION ON THE VERB OBJECT IS NOT RECOGNIZED: AVG.APP_AGENCY_NAME BYPASSING TO END OF COMMAND (FOC009) INCOMPLETE REQUEST STATEMENT
what i want to trap FOC004
Posts: 18 | Location: Trenton, New Jersey | Registered: November 24, 2003
reFOCUSing, JG is right, you need to check to see if the previous code worked with a test of &FOCERRNUM to see if it is Zero or not.
Be aware that a report can work and still get a non zero error number, e.g. a report that panels will get (FOC3218) NOTE: REPORT WILL BE PANELED; TOTAL WIDTH IS:.
You will also need to take into account if the last reprot in you compound report is the failed one. As this will also stop the report from being produced.
As for EMGSRV, Doc Services missed one option SET EMGSRV=FILE. This writes out the "MESSAGES" to a file. I have used this to analyse the output and return a "Nice" page back to the user explaining there was an error and indicating the first one.
-RUN 0 ERROR AT OR NEAR LINE 421 IN PROCEDURE app_file_select (FOC004) THE OPTION ON THE VERB OBJECT IS NOT RECOGNIZED: AVG.APP_AGENCY_NAME BYPASSING TO END OF COMMAND (FOC009) INCOMPLETE REQUEST STATEMENT
what i want to trap FOC004
John,
The original point relates to being able to get a "production" report to produce output even when one of the intermediate reports produces no output. Your question appears to relate to development of the report as, imho, if you are getting a FOC004 in a "production" report then it hasn't been tested enough or properly!
If you have this sort of error creeping into your "production" reports then I would want to know why? If it's due to frequently changing MFDs then chop off the hands of the perp! If it is because the end user can choose fields to include within a report - then re-educate the developer so that the interface they have develped is more controlled! etc. etc. etc.
Waz,
You really must take more water with it mate! Check out the date of the post from reFOCUSing
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, 2004