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] CSV File Issue (Format COM)

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] CSV File Issue (Format COM)
 Login/Join
 
Member
posted
When I run the code below with the Default Make of "BMW' I get prompted to Open, Save or Save as the CSV output(6 records) in Excel.
If I enter a Make of 'KIA', no records are found and I branch to label 'RUN_RPT2' where I run the same code with Make 'BMW' but I don't get prompted to open the CSV output in Excel.
Has anyone experienced this issue or have a solution ?

-SET &ECHO = 'ALL';
-DEFAULT &MAKE = 'BMW'
-*
TABLE FILE CAR
WHERE CAR EQ '&MAKE';
SUM
RCOST
DCOST
BY CAR
BY MODEL
ON TABLE PCHOLD FORMAT COM
END
-RUN
-IF &LINES EQ 0 GOTO RUN_RPT2;
-EXIT
-*
-RUN_RPT2
TABLE FILE CAR
WHERE CAR EQ 'BMW';
SUM
RCOST
DCOST
BY CAR
BY MODEL
ON TABLE PCHOLD FORMAT COM
END

This message has been edited. Last edited by: FP Mod Chuck,


Dev Studio 8.0.09
App Studio 8.2.01
DB2, FOCUS
PDF, HTML, Excel, CSV
In Focus since 1983
 
Posts: 26 | Location: Cincinnati, OH | Registered: August 22, 2007Report This Post
Virtuoso
posted Hide Post
It reproduces in 8203M as well. I added a -RUN and it didn't make a difference. I also tried different formats like XLSX and PDF. The only two formats that worked are HTML and AHTML. I really can't figure out what's causing this but clearly it has to do with the &LINES if test.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Platinum Member
posted Hide Post
Try using HOLD files ... then create the CSV at the end ... Like this ...

SET EXCELSERVURL = ''
-*
-DEFAULT &MAKE = 'KIA'
-*
TABLE FILE CAR
WHERE CAR EQ '&MAKE';
SUM
RETAIL_COST
DEALER_COST
BY CAR
BY MODEL
ON TABLE HOLD
END
? HOLD
-RUN
-IF &LINES EQ 0 GOTO RUN_RPT2;
-GOTO DO_CSV;
-EXIT
-*
-RUN_RPT2
TABLE FILE CAR
WHERE CAR EQ 'BMW';
SUM
RETAIL_COST
DEALER_COST
BY CAR
BY MODEL
ON TABLE HOLD
END
? HOLD
-RUN
-*
-DO_CSV
TABLE FILE HOLD
SUM
RETAIL_COST
DEALER_COST
BY CAR
BY MODEL
ON TABLE PCHOLD FORMAT XLSX
END


WebFocus 8.201M, Windows, App Studio
 
Posts: 227 | Location: Lincoln Nebraska | Registered: August 12, 2008Report This Post
Member
posted Hide Post
jfr99,

Thank you for your reply. Your work around using a hold file works fine.
I don't know why the original code doesn't work with 'COM' or 'COMT' formats. It works with Excel, PDF, HTML, DHTML, WP, etc.

Ted


Dev Studio 8.0.09
App Studio 8.2.01
DB2, FOCUS
PDF, HTML, Excel, CSV
In Focus since 1983
 
Posts: 26 | Location: Cincinnati, OH | Registered: August 22, 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] CSV File Issue (Format COM)

Copyright © 1996-2020 Information Builders