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 by case] Pipe delimited text file without extra spaces

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED by case] Pipe delimited text file without extra spaces
 Login/Join
 
Member
posted
I need to create a pipe delimited text file that is variable length without trailing spaces in the various fields.

I tried doing a soft concatenation in my DEFINE, but it still requires me to set a fixed length for that field as a whole. I'm using a PIPE = '|' in my DEFINE to get the pipe character.

Thanks,

Wendy

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


Version 767
Windows XP
a text file - pipe delimited without any trailing spaces in any of the fields
 
Posts: 2 | Registered: November 19, 2009Report This Post
Virtuoso
posted Hide Post
Just create your defined field as a variable format field:
DEFINE FILE CAR
CCM/A52V=COUNTRY||'|'||CAR||'|'||MODEL;
END
TABLE FILE CAR
PRINT CCM
-*ON TABLE SAVE AS CCM FORMAT ALPHA
END


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Expert
posted Hide Post
How about using FORMAT DFIX.
TABLE FILE CAR
PRINT COUNTRY CAR MODEL
ON TABLE HOLD FORMAT DFIX DELIMITER |
END


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:
How about using FORMAT DFIX


Well, that would be the easy way.

I forgot that the variable length field actually puts the length of the string at the beginning of the string so you have extra characters that you probably don't want.

if you run Waz's code and throw a
-RUN
-SET &CNT=&LINES;
-REPEAT LOOP &CNT TIMES
-READ HOLD &VALUES.A52. NOCLOSE
-TYPE &VALUES
-LOOP

at the end, you can see that you'll be getting exactly what you're asking for.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Member
posted Hide Post
I finally found the time to focus on this project again. The DFIX wasn't working for me initially, but with the help of IBI figured out the WebFOCUS server needed to be upgraded to version 7.6.10 and then the DFIX worked great. IBI was able to replicate the DFIX not working on version 7.6.7.

Thanks so much for your responses.

Wendy


Version 767
Windows XP
a text file - pipe delimited without any trailing spaces in any of the fields
 
Posts: 2 | Registered: November 19, 2009Report 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 by case] Pipe delimited text file without extra spaces

Copyright © 1996-2020 Information Builders