All Forums Tools
loafob 5 posts Joined 11/09
30 May 2014
BTEQ - show command loses formatting

I am using BTEQ to create files containing table definitions. The command is working, but the resulting DDL files have lost all newlines and are instead smooshed together on a single line. Is there a way to retain the source formatting (if there is such a thing) to keep the DDL readable?

dnoeth 4628 posts Joined 11/04
30 May 2014

This might be due to different linebreaks on Unix/windows.
Did you use SHOW TABLEs?
Did you run BTEQ on Linux and open the DDLs on Windows?
e.g. WordPad can deal with Unix linebreaks, but not Notepad.


loafob 5 posts Joined 11/09
30 May 2014

Thanks for the response Dieter!
And yea, I used a show:

cat << !* > $runscript
.set titledashes off
.set format OFF

show table $db.$obj;


I am viewing the file in vi. 

Raja_KT 1246 posts Joined 07/09
30 May 2014

It can be on the unix/linux settings. You can see someone's .profile file FOR  the settings of screen maybe.
With xterm/rxvt/gterm  we can adjust
with (xterm -sl 100 or some numbers..)
Also try to adjust your TD settings (.SET).

Raja K Thaw
My wiki:
Street Children suffer not by their fault. We can help them if we want.

loafob 5 posts Joined 11/09
02 Jun 2014

Thanks Raja, I messed with all the .SET arguments I could find, and nothing worked well for me. In the interim, I have just piped the resulting file to sed and appended a LF:

echo `cat getDDL.output` | sed 's/, /,\
/g' > $db.$obj

good enough for my purposes.

You must sign in to leave a comment.