Focal Point
[CLOSED]Eliminate 2 spaces at the beginning of every row

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

January 13, 2016, 05:56 PM
Jonathan K.
[CLOSED]Eliminate 2 spaces at the beginning of every row
I have a job that I am running, but the .txt file that is being sent has two spaces on every line at the beginning of the line. Is there any way to remove these or change them? Thanks.

TABLE FILE CAR
PRINT
MODEL
BODYTYPE
DEALER_COST
BY CAR
ON CAR SUBFOOT
"TEST"
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SET PAGE-NUM NOPAGE
-*ON TABLE HOLD AS TEST FORMAT ALPHA
END 

This message has been edited. Last edited by: <Emily McAllister>,


WebFOCUS 7.6
Windows, All Outputs
January 13, 2016, 06:17 PM
Waz
There are several ways.

Play with the margins
Set IN 0 for the first column
Play with the LEFTGAP in the stylesheet of the first column.


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!

January 14, 2016, 01:12 PM
BabakNYC
I just ran this request in 8.105 with HOLD FORMAT ALPHA. When I open it in MS Notepad, I don't see any extra spaces.


WebFOCUS 8206, Unix, Windows
January 14, 2016, 03:35 PM
Jonathan K.
I've tried settings margins and leftgap, unfortunately it didn't work.

Maybe in 8.105 they fixed the issue.


WebFOCUS 7.6
Windows, All Outputs
January 14, 2016, 04:32 PM
Waz
Can you post the code you used that didn't work ?


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!

January 15, 2016, 04:43 PM
Jonathan K.
I created a Reportcaster job with .txt file extension referencing this fex.

TABLE FILE CAR
PRINT
MODEL
BODYTYPE
DEALER_COST
BY CAR
ON CAR SUBFOOT
"TEST"
ON TABLE SET HOLDLIST PRINTONLY
ON TABLE SET PAGE-NUM NOPAGE
-*ON TABLE HOLD AS TEST FORMAT ALPHA
ON TABLE SET STYLE *
TYPE=REPORT,LEFTMARGIN=0,LEFTGAP=0,$
ENDSTYLE
END


I have tried all .txt report formats, and while ALPHA excludes the spacing, it doesn't factor in the SUBFOOT.

This message has been edited. Last edited by: Jonathan K.,


WebFOCUS 7.6
Windows, All Outputs
January 17, 2016, 04:06 PM
Waz
What format are you returning the report ?

Also FORMAT ALPHA is a HOLD file format, it does not support headings, footings, subfoots and other options.


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!

January 18, 2016, 04:01 AM
Rifaz
[SOLVED]TEXT output format???

check if this helps


-Rifaz

WebFOCUS 7.7.x and 8.x
January 19, 2016, 10:56 AM
Jonathan K.
Whenever I do a hold/save I lose the subfoot formatting as Waz has stated.

Simply doing:
TABLE FILE CAR
PRINT
MODEL
BODYTYPE
DEALERCOST
END


Creates 2 spaces at the start of every row using TAB/TABT/WP .txt formats. Only report format that doesn't do this is Alpha, but as stated earlier, it doesn't support headings, footings, etc.

This message has been edited. Last edited by: Jonathan K.,


WebFOCUS 7.6
Windows, All Outputs
January 19, 2016, 04:10 PM
Waz
TAB and TABT should not have the 2 characters.

WP will, as the first two character are (old) print control for old line printers.


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!

January 25, 2016, 05:17 PM
<Emily McAllister>
Hello,

Like Waz stated you should not be seeing the spaces at the beginning of your file if you are using format TABT. I'm not seeing the spaces when I run it so I am not sure why you are. Do you have them even when you do not have a SUBFOOT?

Emily McAllister
Focal Point Moderator
January 26, 2016, 09:40 AM
EricH
Jonathan,

I have hit this very problem. It's a bunch of extra coding, but what you can do is on the TABLE FILE do a

ON TABLE SET PAGE-NUM NOPAGE AND LINES 999999
ON TABLE SAVE FORMAT WP

Then after the TABLE FILE you set up a Dialogue Manager loop, do a -READ, LJUST each line. and then -WRITE into another file.