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  iWay Software Product Forum on Focal Point    [SOLVED] How to create a fixed width text file using DM

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] How to create a fixed width text file using DM
 Login/Join
 
Member
posted
We are having difficulty creating a fixed width file using Data Migrator. First it seems we "must" choose "Delimited Flat File" for the output otherwise other file types return control chars or other junk. This might not be an issue even though we have no delimiter (fixed width). Next our biggest issue is when we encounter empty columns on right hand side of the file. For instance if the right most column begins at position 100 and is 10 spaces wide we would expect the file to have a length of 110 spaces. However if the data is null on the right most column it collapses and we receive an output file which is only 100 chars. This won't work for us. We've tried various functions to pad the output in the event of null data but nothing seems to work. The "sample data" even shows the spacing on a null column which gives you a false sense that it will produce the correct file width. Anyone experience this and overcome it? Thanks. My data migration simply pulls from a SQL database where some columns happen to be null top to bottom. Still the correct spacing is required by the receiving system which expects a fixed width flat file of exactly X width.

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 14 | Registered: November 08, 2011Report This Post
Platinum Member
posted Hide Post
Hi,
As a matter of interest - which platform / OS are you running on?

I think I have managed to overcome the issue when the last field has spaces, but I can't remember how. However, a workaround that I occasionally use is to add a field at the end of the row which is forced to have a value e.g. the system date, or a dummy field with a value of "X".


WebFOCUS 8.2.06 mostly Windows Server
 
Posts: 195 | Location: Johannesburg, South Africa | Registered: September 13, 2008Report This Post
Member
posted Hide Post
Sure: We are running ver 7704 update(758) on Windows 2008 R2 (64bit). That is a good idea about placing a char at the far right say 1 char over the fixed width size. I would prefer not to have to resort to this but I might give it a try. The flat file is processed by our ERP system and I'm not sure if it will choke on the extra char on the end. Question for you. Did you use a delimited file choice or were you able to use another option to arrive at a fixed width file? Thanks for your help.


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 14 | Registered: November 08, 2011Report This Post
Platinum Member
posted Hide Post
Hi Phil,
From what I can remember I selected "Formatted File" as my Target adapter, and then I selected ALPHA as the Format. This should generate a "HOLD FORMAT ALPHA" statement - and I seem to think that automatically kept trailing spaces.

Just BTW - one of the approaches which may give you better control when loading a sequential table with a specific layout is to first create a synonym for the format that you want, and then to use that synonym as your target.


WebFOCUS 8.2.06 mostly Windows Server
 
Posts: 195 | Location: Johannesburg, South Africa | Registered: September 13, 2008Report This Post
Virtuoso
posted Hide Post
With Delimited Flat File I would not expect this to be a true fixed width file when the last column is null or blank.

First I would transform the source into new fields, without the Missing attribute. Then I would output as a Formatted File, Format ALPHA.

This should produce a clean fixed width file.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Member
posted Hide Post
Thanks Twanette and Alan B. Your suggestions were spot on. While experimenting we actually used the flat file option then set all columns to alpha fixed and padded to their necessary widths. This produced a clean file with correct spacing however I will look at changing this to "formatted - alpha" as that sounds like the best approach. Thanks again.


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 14 | Registered: November 08, 2011Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [SOLVED] How to create a fixed width text file using DM

Copyright © 1996-2020 Information Builders