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] New record from SYSTABLE

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] New record from SYSTABLE
 Login/Join
 
Platinum Member
posted
Hi Folks,
My problem is that I need to show some zero records for a few labels. Its hard to describe but its stuff we've all come across...
 
DAY     COUNT
Monday     10
Tuesday    22
Friday     38

But I would also like to show the other days with zero records/counts:
  
DAY     COUNT
Monday     10
Tuesday    22
Wednesday   0
Thursday    0
Friday     38

Now, I've inherited code where the coder is doing exactly this. He is making a hold file with the 0 data, and appended it to another table (the table with the non-zero data) via the MORE command. I've tried to use that code as a template, but I'm having problems. I am getting FOC1175 (NO REFERENCE TO FIELD DATA) when I try to create the zero record. This is the code:
  
TABLEF FILE SYSTABLE
SUM	
	COMPUTE TESTME/I1 = 0;
WHERE READLIMIT EQ 1
WHERE RECORDLIMIT EQ 1
ON TABLE HOLD AS ZERO1
END

Any tips?

I also wanted to add that this dude seems to have went this way but he never posted the code.

Oh... I'm using SQL Server

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


WebFOCUS 8201, SP 0.1, Windows 7, HTML
 
Posts: 190 | Registered: May 19, 2017Report This Post
Platinum Member
posted Hide Post
I think this should work for you:
 
SET HOLDLIST=PRINTONLY
TABLEF FILE SYSTABLE
SUM NAME NOPRINT
    COMPUTE TESTME/I1 = 0;
WHERE READLIMIT EQ 1
WHERE RECORDLIMIT EQ 1
ON TABLE HOLD AS ZERO1
END 


WebFOCUS 8.2.06
 
Posts: 210 | Location: Sterling Heights, Michigan | Registered: October 19, 2010Report This Post
Platinum Member
posted Hide Post
That seems to have worked... thank you... doing a little more testing...


WebFOCUS 8201, SP 0.1, Windows 7, HTML
 
Posts: 190 | Registered: May 19, 2017Report This Post
Member
posted Hide Post
As a possible alternative, when you are a reporting a set of logical and unchanging categories (like days of the week), you may consider skipping the blank data generation and simply defining your rows or columns explicity:

 TABLE FILE CAR
SUM CNT.SEATS
BY SEATS ROWS 1 OVER 2 OVER 3 OVER 4 OVER 5 OVER 6 OVER 7
ON TABLE PCHOLD FORMAT HTML
END 


This might be a more elegant solution in some circumstances - useless in others. Best of luck!


WebFOCUS 8202
Windows, All Outputs
 
Posts: 12 | Registered: June 16, 2016Report 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] New record from SYSTABLE

Copyright © 1996-2020 Information Builders