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] COMT output not behaving Like other Output types

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] COMT output not behaving Like other Output types
 Login/Join
 
Gold member
posted
I have a fex and a launch page where you can select various output types(HTML,AHTML,EXl2k,PDF,COMT). If there is no output or no records selected. I redirect to a no output HTML page. Works great for all output types but COMT. COMT gives me the standard Ugly you got Nor records because meswsage on top of my HTML page. Any sugestions other than a first pass to check for records.

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


Duane

WebFOCUS 8.0.7
DS 8.0.7 AS 8.0.7
Windows
Output: Excel, HTML, PDF, AHTML,Mobile
In Focus 1982
 
Posts: 83 | Location: Princeton NJ | Registered: October 26, 2007Report This Post
Virtuoso
posted Hide Post
What is your statment for redirecting?
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Gold member
posted Hide Post
-RUN
-SET &OUTLINES=&LINES;
-IF &OUTLINES GT 0 GOTO OUTPUT_EXIT;
-INCLUDE errorout
-OUTPUT_EXIT


Duane

WebFOCUS 8.0.7
DS 8.0.7 AS 8.0.7
Windows
Output: Excel, HTML, PDF, AHTML,Mobile
In Focus 1982
 
Posts: 83 | Location: Princeton NJ | Registered: October 26, 2007Report This Post
Virtuoso
posted Hide Post
&LINES Should work.

what if you did this the opposite way

IF &OUTLINES EQ 0 GOTO ERROROUT.

The GT might be throwing it off...just a thought.
 
Posts: 1903 | Location: San Antonio | Registered: February 28, 2005Report This Post
Master
posted Hide Post
APP PREPENDPATH IBISAMP
SET MSG=OFF
-RUN
TABLE FILE GGSALES
 PRINT *
 IF SEQ_NO EQ 99999999
 ON TABLE PCHOLD FORMAT EXL2K
-* ON TABLE PCHOLD FORMAT COMT 
END
-RUN
-SET &WORK = &LINES;
-IF &WORK LE 0 GOTO ERROR;
-EXIT
-ERROR
-TYPE Error! &WORK records found.
-EXIT  
Gives:
Error!        0 records found.

On the other hand..
APP PREPENDPATH IBISAMP
SET MSG=OFF
-RUN
TABLE FILE GGSALES
 PRINT *
 IF SEQ_NO EQ 99999999
-* ON TABLE PCHOLD FORMAT EXL2K
 ON TABLE PCHOLD FORMAT COMT 
END
-RUN
-SET &WORK = &LINES;
-IF &WORK LE 0 GOTO ERROR;
-EXIT
-ERROR
-TYPE Error! &WORK records found.
-EXIT 
Gives:
EDA no data 

It is as if, the FORMAT in effect, changes the behavour of PCHOLD command.

We are planning to offer format COMT to users as well. (We like the way the data downloads and opens in Excel quickly.)

However, we also have a standard to check for zero records reported.

This message has been edited. Last edited by: David Briars,




Pilot: WebFOCUS 8.2.06 Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2016/Tomcat Standalone Workstation: Windows 10/IE11+Edge Database: Oracle 12c, Netezza, & MS SQL Server 2019 Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer & ReportCaster
 
Posts: 822 | Registered: April 23, 2003Report This Post
Expert
posted Hide Post
Duane

Can you repro with the sample focus files ?


David,

I would not suggest having any code after a PCHOLD, logically it will return the output, and then what is it going to do ?

I have seen WebFOCUS do exactly what you are saying.

If you need to check the output, then HOLD the output, and if needed, use SET HTMLFORMTYPE and -HTMLFORM.


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
Virtuoso
posted Hide Post
COMT produces an extra "row" with Title information. Still, that should not affect &LINES.

The integer values stored in the statistical variables (&LINES, &RECORDS, &FORMAT, etc.) are right-justified, blank-padded on the left. When you assign &LINES directly to another variable, it's treated as a string assignment, and the RJSF arrangement is retained; whereas
-SET &LINE2=0+&LINES;
will convert the string in &LINES to an integer, and store the integer in stripped form. (output of "-? &LIN" makes that clear).

Obviosely the behind-the-scenes activity to compare 0 to ' 0' is more involved that comparing 0 to 0 -- whether the comparison operator is EQ, NE, or GT.

I would try out 0+&LINES -- and perhaps 0+&RECORDS as well -- before giving up.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Master
posted Hide Post
quote:
If you need to check the output, then HOLD the output, and if needed, use SET HTMLFORMTYPE and -HTMLFORM.

Thanks Waz.

Do you have an idea what the values for the 'SET HTMLFORMTYPE' and 'ON TABLE HOLD FORMAT' commands would be to create/download a format COMT file?

SET HTMLFORMTYPE = ?

ON TABLE HOLD FORMAT ?

Thanks again.




Pilot: WebFOCUS 8.2.06 Test: WebFOCUS 8.1.05M Prod: WebFOCUS 8.1.05M Server: Windows Server 2016/Tomcat Standalone Workstation: Windows 10/IE11+Edge Database: Oracle 12c, Netezza, & MS SQL Server 2019 Output: AHTML/XLSX/HTML/PDF/JSCHART Tools: WFDS, Repository Content, BI Portal Designer & ReportCaster
 
Posts: 822 | Registered: April 23, 2003Report This Post
Expert
posted Hide Post
David, if you search for HTMLFORMTYPE in the forum, you will get what you need.

http://forums.informationbuild...Type=1&search=Search


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
Virtuoso
posted Hide Post
quote:
Originally posted by David Briars:
Do you have an idea what the values for the ... 'ON TABLE HOLD FORMAT' commands would be to create/download a format COMT file?

ON TABLE HOLD FORMAT ?


Something that doesn't display but does give you a usable &LINES count, for example ALPHA or FOCUS.
It's only meant as temporary storage so you can decide whether you need to generate the final output step (using that same file), after all Wink


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
Gold member
posted Hide Post
That is what has become our work around a first pass of the file with the same selection criteria with recordlimit eq 1 saved into a holdfile. The test for &lines and branch to the routinee above if zero lines.


Duane

WebFOCUS 8.0.7
DS 8.0.7 AS 8.0.7
Windows
Output: Excel, HTML, PDF, AHTML,Mobile
In Focus 1982
 
Posts: 83 | Location: Princeton NJ | Registered: October 26, 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] COMT output not behaving Like other Output types

Copyright © 1996-2020 Information Builders