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.
Our users frequently request ',' delimited file from us; however, the standard format from webfocus does not handle that correctly. I would like to ask your assistance for a way easily using the standard option from webfocus and generate a file for my users. Please advice. Currently, we have to do the file with following codes, but there will be some problem if it is a large number of output fields.
DEFINE FILE FILEO REC1/A136=ID||(',' | NAME)||(','|SMAL_EMAIL_ADDRESS)||(','|PHONE2); END
Output will be like-
id,name,emailaddr,phone ---no " is needed
Prod: WebFOCUS 7.1.1 CGI - Self Service - Report Caster,Win2000/IIS Output: HTML, Excel 2000 and PDF
Posts: 36 | Location: LOS ANGELES | Registered: February 01, 2006
The reason for double-quotes is that you could have data with commas in it (e.g. a Company Name could be Johnson, Johnson and Jackson) and you wouldn't be able to differentiate between a comma to separate the columns and a comma in the data.
If you're not worried about that, you could do this:
FILEDEF H1 DISK apptest/H1.TXT
TABLE FILE CAR
PRINT
COUNTRY
COMPUTE COMM1/A1 = ',';
CAR
COMPUTE COMM2/A1 = ',';
MODEL
ON TABLE HOLD AS H1 FORMAT ALPHA
END
The output file will look something like this:
ENGLAND ,JAGUAR ,V12XKE AUTO
JAPAN ,DATSUN ,B210 2 DOOR AUTO
JAPAN ,TOYOTA ,COROLLA 4 DOOR DIX AUTO
ITALY ,ALFA ROMEO ,2000 4 DOOR BERLINA
W GERMANY ,BMW ,2002 2 DOOR
W GERMANY ,BMW ,2002 2 DOOR AUTO
W GERMANY ,BMW ,3.0 SI 4 DOOR
FRANCE ,PEUGEOT ,504 4 DOOR
Francis
Give me code, or give me retirement. In FOCUS since 1991
Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
Thanks Francis. We are currently using this method. We use the || to eliminate the trailing spaces (which is important for our file size and for FTP purpose).
I hope there is a way from webfocus we just need to issue ON TABLE PCHOLD etc.
Prod: WebFOCUS 7.1.1 CGI - Self Service - Report Caster,Win2000/IIS Output: HTML, Excel 2000 and PDF
Posts: 36 | Location: LOS ANGELES | Registered: February 01, 2006
I'd be curious what the ouput is to be used for, but to pull out all extra blanks, your build a string may be the 'best' solution, however 'bad' it is.
Leah
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004
I've created a tab delimited file and then used a perl script within my focexec to create a csv file. If you have perl installed on your webfocus server and you want to see an example, let me know.
Jim
WF DevStu 5.2.6/WF Srv 5.2.4/Win NT 5.2
Posts: 118 | Location: Lincoln Nebraska | Registered: May 04, 2005
I don't know if this will help, but I developed a routine which takes a spreadsheet and creates a .MAS file so it's FOCUS-readable. The routine isn't 100% perfect, but it saves ME lots of tedious time trying to build a .MAS from scratch.
It uses good old green-screen FOCUS and Dialogue Manager.