How to set a defalult width for all of my bteq reports?

Tools
Enthusiast

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?

7 REPLIES
Enthusiast

Re: How to set a defalult width for all of my bteq reports?

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...

Junior Contributor

Re: How to set a defalult width for all of my bteq reports?

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
Enthusiast

Re: How to set a defalult width for all of my bteq reports?

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.. 

Enthusiast

Re: How to set a defalult width for all of my bteq reports?

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

Thanks,

Koti

Junior Contributor

Re: How to set a defalult width for all of my bteq reports?

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

Enthusiast

Re: How to set a defalult width for all of my bteq reports?

It is working...

Great !!

Thank you verymuch  Dieter !!

Enthusiast

Re: How to set a defalult width for all of my bteq reports?

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