BTEQ inserts unwanted newline

Database
Enthusiast

BTEQ inserts unwanted newline

Hi Folks
I am automating the refresh of some view based, whose base tables have changed.
The shell I run generates a DDL scripts
show view $dbname$viewname ;
the out put of this script has
"create view" being changed to replace view

Replace view ( blah ...)
-- Comments ...........once upon a time etc...............
contd..............

the Problem is that when I feed this to bteq again it insert a new line when it is not needed.

e.g. Ideal :

Replace view ( blah )
--- Comment ...Once upon a time etc.......

(case when columnA= ) , Column2, Column3 et

The way bteq reads this :
Replace view ( blah )

--- Comment ...
Once upon a time etc.......
( split the line and then says error there is no column like Once upon a time )

(case when columnA=<expre
ssion> ) , Column2, Column3 et

( split the line and then says error there is no column like "ssion>" )

Bteq settings are
.width is max at 256
.export data file="foo.op"

I changed the settings around a bit to no avail. Is there a way where you can ASK BTEQ TO KEEP WRITING ON THE SAME LINE REGARDLESS EXACTLY AS IN SHOW VIEW AND NOT SPLIT THE LINE

4 REPLIES
Enthusiast

Re: BTEQ inserts unwanted newline

if you are still not running in old versions of bteq, increase the width

.SET WIDTH 10000 ( or so ...)
Enthusiast

Re: BTEQ inserts unwanted newline

The latest version doc says max as 254 .
is this not right ? can we increase it to 100000+
Enthusiast

Re: BTEQ inserts unwanted newline

I am not sure which version of the doc you are referring to..

To quote TTU 8.2 doc (which is also not the latest)

The valid range is from 20 to 65531
Enthusiast

Re: BTEQ inserts unwanted newline

Right .I probably looked at some real old stuff.
Thanks Joe