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.
I need to output these fields into a pipe delimited ASCII file so the output looks as follows. It is important not to have any leading or trailing spaces. I am struggling to eliminate the trailing spaces. Any suggestions?
FIELD1|FIELD2|FIELD3|FIELD4This message has been edited. Last edited by: <Kathryn Henning>,
WebFOCUS 7.6.10 Windows all output (Excel, HTML, PDF)
DEFINE FILE CAR
FIELD1/A15 = 'Test Alpha';
FIELD2/P12.4 = 1234.5678;
FIELD3/HMDYYS ='2015/01/23 04:34:00.000000';
FIELD4/A35 = 'Test Alpha';
END
TABLE FILE CAR
PRINT FIELD1 FIELD2 FIELD3 FIELD4
BY COUNTRY NOPRINT
ON TABLE PCHOLD FORMAT DFIX DELIMITER |
END
Any problem with this?
-Rifaz
WebFOCUS 7.7.x and 8.x
Posts: 406 | Location: India | Registered: June 13, 2013
Rifaz - Thanks much for the tip! There is a slight issue though - this doesn't seem to work with the ON TABLE SAVE command if I do ON TABLE SAVE FILENAME '\\srvstorage\FILENAME.DAT' FORMAT DFIX DELIMITER |
Is there another way to save this file. Its important that the file name stays in upper case.
WebFOCUS 7.6.10 Windows all output (Excel, HTML, PDF)
ON TABLE SAVE FILENAME '\\srvstorage\FILENAME.DAT' FORMAT DFIX DELIMITER |
I never used FILENAME keyword. So, the problem now is to save the filename in uppercase. Hope this helps.
-SET &_FILENAME=UPCASE(17, 'DELIMITERFILE.DAT', 'A17');
DEFINE FILE CAR
FIELD1/A15 = 'Test Alpha';
FIELD2/P12.4 = 1234.5678;
FIELD3/HMDYYS ='2015/01/23 04:34:00.000000';
FIELD4/A35 = 'Test Alpha';
END
FILEDEF UPPER DISK baseapp/&_FILENAME
-RUN
TABLE FILE CAR
PRINT FIELD1 FIELD2 FIELD3 FIELD4
BY COUNTRY NOPRINT
ON TABLE SAVE AS UPPER FORMAT DFIX DELIMITER |
END
-Rifaz
WebFOCUS 7.7.x and 8.x
Posts: 406 | Location: India | Registered: June 13, 2013
Hi Rifaz, Thanks so much for further input. However, it seems that DFIX only works with PCHOLD or HOLD format. So now I am doing APP HOLD and then TABLE HOLD - however, it always saves the file in lower case when I want upper case (I am trying to use -WINNT command to change filename to uppercase). If you have any smarter way to create an upper case file, please let me know. Also, if you could provide input for this case - would greatly appreciate it. Much thanks! http://forums.informationbuild...1057331/m/1117032776
WebFOCUS 7.6.10 Windows all output (Excel, HTML, PDF)
FILEDEF HFILE1 DISK BASEAPP/HFILE.TXT
-RUN
DEFINE FILE CAR
FIELD1/A15 = 'Test Alpha';
FIELD2/P12.4 = 1234.5678;
FIELD3/HMDYYS ='2015/01/23 04:34:00.000000';
FIELD4/A35 = 'Test Alpha';
END
TABLE FILE CAR
PRINT FIELD1 FIELD2 FIELD3 FIELD4
BY COUNTRY NOPRINT
ON TABLE HOLD AS HFILE1 FORMAT DFIX DELIMITER |
END
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