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     Issues with delimited file

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Issues with delimited file
 Login/Join
 
Silver Member
posted
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, 2006Report This Post
Guru
posted Hide Post
I'm not sure what you are asking.

FORMAT LOTUS will give you a comma delimited file as will FORMAT COMMA.

FORMAT COMT will give you a comma delimited file where the first line contains the column headings.


Glenda

In FOCUS Since 1990
Production 8.2 Windows
 
Posts: 301 | Location: Galveston, Texas | Registered: July 07, 2004Report This Post
Silver Member
posted Hide Post
The comm format comes back with a " around the alpha fields, but what the user wants is just , instead.

for example-
namelast, name first, age, mm/dd/yy, 9999
instead of
"namelast", "name first", age, "mm/dd/yy", 9999




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, 2006Report This Post
Expert
posted Hide Post
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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Silver Member
posted Hide Post
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, 2006Report This Post
Virtuoso
posted Hide Post
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, 2004Report This Post
Platinum Member
posted Hide Post
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, 2005Report This Post
Silver Member
posted Hide Post
Thanks. We don't have perl, but I guess you gave me an idea.
I'll read the csv file back and change tab to , using focus routine.




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, 2006Report This Post
Member
posted Hide Post
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.
 
Posts: 5 | Registered: April 20, 2007Report This Post
Silver Member
posted Hide Post
Thanks for your reply. Excel will be helpful.




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, 2006Report 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     Issues with delimited file

Copyright © 1996-2020 Information Builders