All Forums UDA
LM Tera User 3 posts Joined 08/06
30 Aug 2006
Supressing Titles on .EXPORT command

I am trying to run BTEQ with a .EXPORT command as below...cat << !* > $getpth .logon $SCHEMA/$USER,$PASSWORD; .EXPORT REPORT FILE = kbtstfile; select APP_NAME, RUN_NAME, GROUP_NUMBER, RUN_ORDER from $DBPREFIX.dm_driver_steps_t where run_status = 'S' and run_order = 40; .EXIT !* Everything works and returns expected rows, but how can I get rid of the column headers and -------- that return below??APP_NAME RUN_NAME GROUP_NUMBER RUN_ORDER ------------------------- ------------------------- ------------ --------- edw STG_ODS 100 40

sparan 19 posts Joined 05/06
31 Aug 2006

use (title '') for each filed.select APP_NAME(title ''),RUN_NAME(title ''), GROUP_NUMBER(title ''), RUN_ORDER (title '')from $DBPREFIX.dm_driver_steps_t where run_status = 'S' and run_order = 40;use set underlines and titledashes to off.--Sparan

LM Tera User 3 posts Joined 08/06
31 Aug 2006

Sparan,Thanks for the help. This solution is just what I needed.

dnoeth 4628 posts Joined 11/04
31 Aug 2006

Another way without specifying (title '') for each column:.export DATA file=.....set recordmode offExports in REPORT mode without any header...But don't ask my WHY it's working this way :-)Dieter

Dieter

LM Tera User 3 posts Joined 08/06
31 Aug 2006

Thanks Dieter

DiEgoR 33 posts Joined 08/06
16 Oct 2006

.SET TITLEDASHES OFF;will do if you only want to get rid of the dashes.

input output putput

TDJeet1982 9 posts Joined 06/12
26 Nov 2013

I dont want headers to print, i am using (TITLE ''), but it is giving an extra comma in 1st line as below

.EXPORT REPORT FILE=${NOTIFY_DIR}/${NOTIFY_FILE_COR_SEM};

 .SET SIDETITLES OFF;

 .SET TITLEDASHES OFF;

 .SET WIDTH 5000;

 .SET SEPARATOR ',';

 .SET RECORDMODE OFF; 

 .SET FORMAT OFF ;

 .sET UNDERLINE OFF;

 

SELECT core_tb_name(TITLE '') ,sem_tb_name(TITLE '')  FROM ${CTRL_DB}.${CTRL_TBL_COR};

 

THE RESLUT IS , i get an  extra comma in the first line 

      ,

abc,xyz

zzz,rrr

 

 

 

Kawish_Siddiqui 37 posts Joined 03/07
26 Nov 2013

Can you check if nulls or blank records are in table?

Kawish Siddiqui -

TDJeet1982 9 posts Joined 06/12
26 Nov 2013

Thanks for the reply.
No there are no blanks or nulls in any of the columns in the table.

Raja_KT 1246 posts Joined 07/09
26 Nov 2013

Hi,
 
You can use recordmode off
You can try this way:
 

select CAST( core_tb_name|| ',' ||

sem_tb_name|| '~' ||

(CASE WHEN anotherfield IS NULL

THEN '?'

ELSE ACC_CO_NO

END)..... AS CHAR( ) (TITLE '')

from ${CTRL_DB}.${CTRL_TBL_COR};

 

It means you cast all with no title.

 

It is a data issue.

 

Usually when I am in a hurry, since I port to unix, so I remove a line sed '1d' fileName.txt
Cheers,
Raja

Raja K Thaw
My wiki: http://en.wikipedia.org/wiki/User:Kt_raj1
Street Children suffer not by their fault. We can help them if we want.

You must sign in to leave a comment.