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] problem with alpha text file wrapping data

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] problem with alpha text file wrapping data
 Login/Join
 
Member
posted
I have a user that is doing an app fi to create a text file formatted as alpha. When you look at the text file, some of the lines are wrapped to a second line thus causing issues when trying to create a report or graph off the the text file. Is there a way to create the text file and prevent the fields that have a lot of text from wrapping to the next line? Here is part of the code:

TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD AS SIDATA4GRAPHS
END

APP FI SIDATA4GRAPHS1 DISK d:\ibi\apps\sball\sidata4graphs.txt
APP HOLDMETA VISDIS

TABLE FILE SIDATA4GRAPHS
PRINT *
BY BUSINESS_UNIT NOPRINT
WHERE CREATE_DATE NE MISSING;
ON TABLE SET PAGE-NUM OFF
ON TABLE NOTOTAL
ON TABLE HOLD AS SIDATA4GRAPHS1 FORMAT ALPHA
END

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


7.1.7
Vista
 
Posts: 29 | Registered: July 05, 2007Report This Post
Virtuoso
posted Hide Post
Selena

If you want to use the output from the database to be used in a report or graph it is maybe not a good idea to save it as a text file.
I would just hold it as an internal format file.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Expert
posted Hide Post
The rows of data should not wrap. Are you sure it's not the editor you're using to view the hold file that's causing the data to wrap?

It is possible that carriage-return/line-feed characters embedded in the data could cause it to wrap. If you have a column that is text entered by a user, it may have embedded carriage-return/line-feed characters.


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
Member
posted Hide Post
The database team suggested using the following in the sql code:
,replace(BACKGROUND_INFO,chr(13),NULL) BACKGROUND_INFO
,replace(NEXT_ACTION,chr(13),NULL) NEXT_ACTION
,replace(RISK_ASMNT_EXTN_APPROVAL,chr(13),NULL) RISK_ASMNT_EXTN_APPROVAL

The user is creating a text file because it is easier on the system to get the data one time and report off of it rather than hitting the database every single time (this is due to the complex table structure on the db side to get all of the fields that are needed).
I don't think it's the editor. The user stated that when she does a count on some of the fields, the count is incorrect.


7.1.7
Vista
 
Posts: 29 | Registered: July 05, 2007Report This Post
Virtuoso
posted Hide Post
Selena

In this case I would do this:

run this code say once a day (you can schedule it with ETL or RC)

TABLE FILE SQLOUT
PRINT *
ON TABLE HOLD
END
-RUN
APP HOLD BASEAPP
DEFINE FILE HOLD
RUNDATE/YYMD=&YYMD;
END
TABLE FILE HOLD
PRINT *
ON TABLE HOLD AS SIDA4GRP FORMAT FOCUS
END


Now the user has the SID4GRP data available in a FOCUS database, that will be renewed every day.
I added the RUNDATE field so you can see it is that special day. (Maybe if you also need runtime ad &TOD).
Now The user can build the needed reports based on that focus database.




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Member
posted Hide Post
Thanks for all of the input! I will try your suggestion Frank. I think that will work.


7.1.7
Vista
 
Posts: 29 | Registered: July 05, 2007Report This Post
Virtuoso
posted Hide Post
Another problem I have occasionally seen is that the text file is subsequently read with a Master file that does not properly described the text file layout. For example if you have a record that is 10 characters long and the field format that reads it is A9, then WF just supposes that everything after the 9th character must be the next record, so although it appears as if it is wrapping to the next line, it is actually showing it as the next record. Don't know if that might be the issue but I've seen similar "symptoms" like this before.
Frank's suggestion would also solve the problem because the Master file that subsequently reads it is automatically created to accurately describe the data layout.


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
  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] problem with alpha text file wrapping data

Copyright © 1996-2020 Information Builders