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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Nodata..
 Login/Join
 
Platinum Member
posted
Hi all,
i want to know how to use the NODATA .i.e;if my report has '0' records i want to display in the output as NODATA available.so want to know how to start of with....

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


7.6.7
windows
PDF,EXCEL.
 
Posts: 160 | Location: Atlanta,GA | Registered: July 16, 2009Report This Post
Platinum Member
posted Hide Post
i tried:--->
-IF &RECORDS EQ 0 THEN GOTO ENDFEX;

-ENDFEX
-EXIT


WHEN I RUN my code and if the records are equal to 0 i get EDA NO DATA.i want the text as nodata available ,so where can i modify the text...
PLEASE add incase i missed any..........

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


7.6.7
windows
PDF,EXCEL.
 
Posts: 160 | Location: Atlanta,GA | Registered: July 16, 2009Report This Post
Platinum Member
posted Hide Post
please close it,the problem is solved....


7.6.7
windows
PDF,EXCEL.
 
Posts: 160 | Location: Atlanta,GA | Registered: July 16, 2009Report This Post
Expert
posted Hide Post
FYI

NODATA is used for data that is missing/null


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
Hi Swati,

Sample CAR File:

TABLE FILE CAR
PRINT
COMPUTE SPC/A1=''; AS ''
WHERE RECORDLIMIT EQ 1
BY CAR NOPRINT
ON CAR SUBHEAD
" "
" "
"No Data is available"
" "
END
-RUN


WebFOCUS 7.6.x
Windows
Output: Excel,PDF, HTML
 
Posts: 42 | Registered: September 28, 2007Report This Post
Platinum Member
posted Hide Post
quote:
ORDLIMIT

Hi

After you write the data into SQLOUT

just checn &LNS = 0
then write HTML tag
" No data found for this selecton"

This method is working fine for me

Thanks
Gobinath Velusamy


WebFOCUS 7610
Windows
 
Posts: 121 | Registered: September 25, 2007Report This Post
Platinum Member
posted Hide Post
As said before : Nodata -> Missing / Null
After the End of the Request ( -RUN to synchronise Focus and DM -DM of the Machine that fills the Data-) the System Variables &LINES etc .. are available.
And the SET EMPTYREPORT = ON / OFF used to do the Job under Focus
Cordially and Focusely
PS : Precise answers or a friendly push towards really getting into the '$Focus$' world ?


Focus Mainframe 7.6.11
Dev Studio 7.6.11 and !!!
PC Focus, Focus for OS/2, FFW Six, MSO
 
Posts: 134 | Registered: November 06, 2007Report This Post
Platinum Member
posted Hide Post
Hi guys,
i am not looking for NODATA OPTION.i am looking for is ---->
if i have '0' records in the output then i want to print saying that "there is no data".if there are any records i will get a report but if there are no records,i want to display a good msg saying "there is no Data".so need a start off for this.......

btw GOBINATH,can you please pass me the code for the HTML tag,which you have written.


7.6.7
windows
PDF,EXCEL.
 
Posts: 160 | Location: Atlanta,GA | Registered: July 16, 2009Report This Post
Expert
posted Hide Post
Swati,

Do you see the </> on the toolbar when you Reply? Put your code between those, and VOILA!, the code is displayed...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
<JG>
posted
To cortrect the exaple from shakila25 which would return the SUBHEAD
when data was retrieved

 
TABLE FILE CAR
PRINT
     CAR
WHERE COUNTRY EQ 'USA'
END
-RUN 
-IF &LINES EQ 0 GOTO NODATA;
-EXIT
-NODATA
-HTMLFORM BEGIN
No Data is available
-HTMLFORM END


You can any styling you want into the HTML

But do get some basic training.
 
Report This Post
Virtuoso
posted Hide Post
The usual method is to extract and hold the data rows for the report, then use dialog manager -IF (or -SET) to sense whether &RECORDS (or &LINES) > 0, and branch (or adjust the report request) accordingly.

I thought about it, and came up with a "pure Focus" alternative, avoiding the Dialog-Manager part:

Convert the TABLE FILE ... HOLD data-extraction section to a MATCH FILE. In the data extraction leg of the Match include a leading column with a row count (equivalent to &LINES); that involves multiple verbs, which is allowed in MATCH FILE. Use the other leg to assure that the merged HOLD file will have at least one row; that enables you to run a TABLE FILE request against the HOLD file, even if the data extraction leg came up empty-handed. Use DEFINE FILE HOLD before the formatted report, to provide a "no data" message in the heading, based on whether COUNT is zero. To avoid displaying zero for numeric columns when the report is "empty", you can redefine them as well, using "S" to suppress display when zero, or making them MISSING when the COUNT column is zero.

As an illustration, run this fex with &LETTER=A (which produces a normal report) and &LETTER=Z (which generates an "empty" report).
-DEFAULT &LETTER='Z'
MATCH FILE CAR
 COUNT ENTRIES
 WRITE SEATS
  BY COUNTRY BY CAR BY MODEL
 IF MODEL CONTAINS '&LETTER'
RUN
FILE CAR
 WRITE FST.COUNTRY AS IGNORE
 AFTER MATCH HOLD OLD-OR-NEW
END

DEFINE FILE HOLD
 NOTE/A30=DECODE COUNT(0 '(No matching records found)' ELSE '');
 SEATS/I5S=SEATS;
END
TABLE FILE HOLD
HEADING CENTER
"<NOTE</1"
 PRINT SEATS
  BY COUNTRY 
  BY CAR SKIP-LINE
  BY MODEL
 ON TABLE PCHOLD FORMAT PDF
END

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
Platinum Member
posted Hide Post
thanks all........


7.6.7
windows
PDF,EXCEL.
 
Posts: 160 | Location: Atlanta,GA | Registered: July 16, 2009Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders