bteq export creating problem

Tools
Enthusiast

bteq export creating problem

Hi All,

I am using below mentioned code in a script for exporting the table definition.

rm -f Table_create.sol
touch Table_create.sol
chmod 777 Table_create.sol
bteq log.txt
.logon *****;
.set retlimit * 2048
.export report file=Table_create.sol
show table dbname.tablename;
.export reset
.logoff
.quit errorcode
end

But table definition in file "Table_create.sol" is coming improper("DEF AULT" instead of "DEFAULT" in below example) so I can't use that definition for other purpose.

e.g. I am getting definition this
CREATE SET TABLE dbname.tablename ,NO FALLBACK ,
NO BEFORE JOURNAL,
NO AFTER JOURNAL,
CHECKSUM = DEFAULT
(
unit_num CHAR(11) CHARACTER SET LATIN NOT CASESPECIFIC,
last_update_action_code CHAR(1) CHARACTER SET LATIN NOT CASESPECIFIC
,
last_update_user_id CHAR(8) CHARACTER SET LATIN NOT CASESPECIFIC [highlight=#ffff11]DEF
AULT[/highlight] 'USD ')
PRIMARY INDEX customers_map_s_pi ( unit_num ,customer_gci );

instead of

CREATE SET TABLE dbname.tablename ,NO FALLBACK ,
NO BEFORE JOURNAL,
NO AFTER JOURNAL,
CHECKSUM = DEFAULT
(
unit_num CHAR(11) CHARACTER SET LATIN NOT CASESPECIFIC,
last_update_action_code CHAR(1) CHARACTER SET LATIN NOT CASESPECIFIC,
last_update_user_id CHAR(8) CHARACTER SET LATIN NOT CASESPECIFIC DEFAULT 'USD ')
PRIMARY INDEX secured_customers_map_s_pi ( unit_num ,customer_gci );

Hence while reading from file, instead of reading "DEFAULT",it reads "DEF".

Please let me know why is it happening?

Thanks for your suggestions.

Regards,
Kunal

1 REPLY
Enthusiast

Re: bteq export creating problem

I got the answer

.set width 64000

Regards,
Kunal