I would like to suppress the column heading and underscore output from the following BTEQ script. Please could you let me know how to do this, the manual seems to omit this option. I can get round it using the tail command in UNIX but it would look more professional if it could be done in BTEQ.
.run file logon.txt .export report file=/badata/wtdata/tdata_count.txt .set format off select count(*) from TABLEA; .EXPORT RESET .LOGOFF .EXIT
Count(*) ----------- 1186
By the way I notice my file is written to incrementally every time I run the BTEQ script. Is there a command to overwrite the content on every run? Again I can work round this by deleting the file in the Unix script at the start of the run but it would look better to do this in one hit with the BTEQ script.
Thanks, Wiinter09, you set me on the right track. I tried your suggestion and had the following error message from BTEQ
select count(*)as REC_CNT (TITLE '') from TABLEA; $ *** Failure 3707 Syntax error, expected something like ';' between the word 'REC_CNT' and '('. Statement# 2, Info =30 *** Total elapsed time was 1 second.
I had a look in the manual for examples of TITLE and found that if you miss out the "as" clause it works beautifully. i.e.