Focal Point
SOLVED - TABT Line Feeds

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/520104415

August 23, 2010, 09:10 AM
ColdWhiteMilk
SOLVED - TABT Line Feeds
I've got a WebFOCUS query that I run to TABT output in a WebFOCUS 7.6.11 environment.

After the query completes, I have a separate process that imports the text file into a Access database. This process uses VBA code, which identifies the end of a line in the text file as a carriage return. This is a process and a piece of VBA code that has been working with no problems for several years.

Very recently, my VBA code started failing because there are no carriage returns at the end of the lines of text in the file. It appears that these are now line feeds instead of carriage returns.

Does anyone know if this was a change that was made in WebFOCUS recently? Is there a way from the WebFOCUS code to force a carriage return at the end of each line of text?

Thank you.

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


Production - 7.6.4
Sandbox - 7.6.4
August 23, 2010, 10:01 AM
Francis Mariani
I had no trouble with importing the tab-delimited file created by this fex:

FILEDEF HCAR1 DISK baseapp/hcar1.txt

TABLE FILE CAR
PRINT *
ON TABLE HOLD AS HCAR1 FORMAT TABT
END

WebFOCUS v7.6.5 / MS Access 2003 SP3

Have you tried a simple fex?


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
August 23, 2010, 10:25 AM
ColdWhiteMilk
Yes, I have tried the MS Access import process with the TABT tile, and it works.

However, the VBA code that I wrote 3-4 years ago does not use the standard Access import specs. I am using the Line Input function, which imports one line at a time, and identifies the end of the line based on the carriage return.

Since this VBA code was written and working for several years and is now not working, I'm looking not just at the VBA code, but also possible WebFOCUS changes that might have caused the problem.

Is there a way with WebFOCUS to create a defined field that is a carriage return that I could append to the end of each line?


Production - 7.6.4
Sandbox - 7.6.4
August 23, 2010, 10:38 AM
Tom Flynn
TYPE=REPORT, LINEBREAK='CR',$


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
August 23, 2010, 01:20 PM
ColdWhiteMilk
Will this work on TABT?

The documentation on here appears to mention PDF formatting.


Production - 7.6.4
Sandbox - 7.6.4
August 23, 2010, 02:13 PM
ColdWhiteMilk
To add another layer to my question:

When I run the TABT query deferred through MRE, my VBA code sees the carriage returns in the text file.

When I run the TABT query with Report Caster, the carriage returns are gone.


Production - 7.6.4
Sandbox - 7.6.4
August 25, 2010, 09:18 AM
GaryB
Try HEXBYT.

This was from some IBI stuff:
CRLF/A2 = HEXBYT(13, 'A1') | HEXBYT(10,'A1') ;

The 13 is the Carriage Return.

G
August 25, 2010, 09:53 AM
ColdWhiteMilk
I've tried with just the 13, and with the 13 and the 10.

The problem seems to be happening when I deliver the TABT file with Report Caster versus running it with MRE.


Production - 7.6.4
Sandbox - 7.6.4
August 30, 2010, 03:38 PM
ColdWhiteMilk
Here is the solution that we came up with:

-SET &CRLFHEADER = HEXBYT(13, 'A1');

DEFINE FILE CAR
CRLF/A5= HEXBYT(13, 'A1');
END

TABLE FILE CAR
PRINT
MODEL
COUNTRY
CRLF AS '&CRLFHEADER.EVAL'

BY COUNTRY NOPRINT

ON TABLE PCHOLD FORMAT TABT
END



Production - 7.6.4
Sandbox - 7.6.4