All Forums Tools
katakoti 21 posts Joined 11/12
28 Nov 2012
How to set a defalult width for all of my bteq reports?

Hi All,
 
When i generate a report by using bteq, it is consuming some columns.
When i give the below statement it works properly.
 
.set width 500;
 
My question is here, how can i set default width for all of my bteqs?
 
 

Qaisar Kiani 337 posts Joined 11/05
28 Nov 2012

I don't think you can set it as a general parameter for BTEQ utility.
Just an alternative way would be to write a shell script that should add this line to all the bteq scripts before executing them...

dnoeth 4628 posts Joined 11/04
28 Nov 2012

Just set the user's STARTUP option which is a SQL statement executed when the user logs on:

modify user xxx as startup = '.set width 500;';

Dieter

Dieter

katakoti 21 posts Joined 11/12
29 Nov 2012

Hi Dieter,
 
I run the above statement for my user id. It run sucessfully.
And then i ran the bteq export seperatly.
 
I got the below error..
 

 *** Warning: Error in your users run startup string.
 $
 *** Failure 3706 Syntax error: expected something between the beginning of
 the request and '.'.
                Statement# 2, Info =3
 
Please take a look here.. 

katakoti 21 posts Joined 11/12
29 Nov 2012

 please let me know how to revert the startup string for that  user id
 
Thanks,
Koti

dnoeth 4628 posts Joined 11/04
29 Nov 2012

Ooops, i forgot that you have to ECHO the command to BTEQ:
MODIFY USER xxx STARTUP = 'ECHO ''.set width 500''';
To reset the user do a "MODIFY USER xxx STARTUP = NULL;"
Dieter

Dieter

katakoti 21 posts Joined 11/12
30 Nov 2012

It is working...
Great !!
Thank you verymuch  Dieter !!
 

Qaisar Kiani 337 posts Joined 11/05
02 Dec 2012

Kool... Never used this option before... that adds to my knowledge as well. Thanks Dnoeth :)

You must sign in to leave a comment.