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]Conitional Reporting

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]Conitional Reporting
 Login/Join
 
Member
posted
Hi,

I'm a COBOL/EZT programmer who is fairly new to FOCUS, for which I have to write some batch error reports. In COBOL/EZT, I can read a file and produce a report of rejected records... If no records are rejected, I can display the report headings and columns and display an information line to the effect of "THERE WERE NO REJECTS ENCOUNTERED IN THIS PROCESSING". In focus, I can produce the report if there are errors, but if there aren't, I get no output. Could someone tell me if it is possible to perform the same function that COBOL can do in FOCUS?... Again, this is strickly (Mainframe)batch FOCUS.

Thanks much,

Tom

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


FOCUS MF = v7.3.3
OS/390 VERSION = z/OS 01.07.00 HBB7720
MVS VERSION = SP7.0.7

 
Posts: 4 | Registered: April 01, 2008Report This Post
Virtuoso
posted Hide Post
This is a basic example. You can test for the number of lines that are in the report, and then tell FOCUS to run the conditional report with a message in it if the lines are 0.

TABLE FILE CAR
SUM
     DEALER_COST
     RETAIL_COST
     SALES
BY COUNTRY
WHERE COUNTRY EQ 'CANADA';
HEADING
"This is a Heading"
FOOTING
""
END
-RUN
-IF &LINES NE 0 GOTO :DONE;
SET EMPTYREPORT=ANSI
TABLE FILE SYSTABLE
PRINT 
     COMPUTE COUNTRY/A10 = ' ';
     COMPUTE DEALER_COST/D10S = 0;
     COMPUTE RETAIL_COST/D10S = 0;
     COMPUTE SALES/D10S = 0;
BY NAME NOPRINT
WHERE RECORDLIMIT EQ 1;
ON NAME SUBHEAD
"THERE WERE NO REJECTS ENCOUNTERED IN THIS PROCESSING"
HEADING
"This is a Heading"
END
-:DONE  


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
 
Posts: 1102 | Location: Toronto, Ontario | Registered: May 26, 2004Report This Post
Member
posted Hide Post
Just use
SET EMPTYREPORT=ON


FOCUS will generate the headers and column titles whether or not there is data.


Production/Test: WF 7.1.4, WIN2K3 Server
 
Posts: 12 | Location: Wilson, NC | Registered: November 14, 2005Report This Post
Member
posted Hide Post
Thanks for the responses, I'll give both a try.

One other question...

In the statement "-IF &LINES NE 0 GOTO Big GrinONE;"... What does the '-' mean or do?

Thanks again,

Tom


FOCUS MF = v7.3.3
OS/390 VERSION = z/OS 01.07.00 HBB7720
MVS VERSION = SP7.0.7

 
Posts: 4 | Registered: April 01, 2008Report This Post
Expert
posted Hide Post
The dash before a command indicates that it is a Dialogue Manager command. A DM command is executed immediately during the focexec parsing process while other non-dash commands are placed in a buffer called FOCSTACK for later execution.

The line that you referenced in your post undoubtedly follows a -RUN command which executes the contents of FOCSTACK. The line that you referenced which checks &LINES is checking to see whether there were any rows produced in the request.

I hope this is clear.


Ginny
---------------------------------
Prod: WF 7.7.01 Dev: WF 7.6.9-11
Admin, MRE,self-service; adapters: Teradata, DB2, Oracle, SQL Server, Essbase, ESRI, FlexEnable, Google
 
Posts: 2723 | Location: Ann Arbor, MI | Registered: April 05, 2006Report This Post
Member
posted Hide Post
Thanks for the responses... I was able to address my issue.

Tom


FOCUS MF = v7.3.3
OS/390 VERSION = z/OS 01.07.00 HBB7720
MVS VERSION = SP7.0.7

 
Posts: 4 | Registered: April 01, 2008Report This Post
Virtuoso
posted Hide Post
Tom

Some day you will gone love Focus....




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report 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]Conitional Reporting

Copyright © 1996-2020 Information Builders