TPT - displaying the SQL from the output of a Tbuild statement and not through tdlog

Tools & Utilities
Highlighted
New Member

TPT - displaying the SQL from the output of a Tbuild statement and not through tdlog

I have a TPT that makes use of user substituted variables into the SQL.

 

It displays using the TDLOG statement, but I want the SQL to display in the output of the tbuild statement i.e. straight into my own log file.

 

 

$newcmd = "|tbuild -f \"E:\\ARM_6_5\\ARM_Playground_Script_Testing_2\\scripts\\script\\911b_delivery_SMS(10008d6gpq22).tp2\" -j 911b_delivery_SMS -v $config_dir".$delimiter."tpt_Config.plx -u ".qq["commdt='$row{Communication_Plan_Date}',LEADSTORE_VIEW_REFERENCE='BFT_OUTSTANDING_OUTPUT_FILE_V',communicationid='$row{Communication_Id}',business_language='$row{Business_Language_Code}',tg_number='$row{TG_Number}',Channel_Instance_Id='10008d6gpq22',filename='$filename'"]." >>$log_file 2>&1";

 

DEFINE JOB PRODARM_EIW_EXTRACT_SPECIFIC_CHANNEL_DATA2
(
DEFINE SCHEMA PRODARM_EIW_SCH
DESCRIPTION 'TERADATA PARALLEL TRANSPORTER SCHEMA'
(
Lead_key CHAR (12),
Party_ID VARCHAR(10),
Party_National_Identification VARCHAR(60),
Response_Message_Txt VARCHAR(1000),
Status VARCHAR(100),
Business_Lang VARCHAR(50),
TG_number CHAR (4)
);

DEFINE OPERATOR FILE_WRITER()
DESCRIPTION 'TERADATA PARALLEL TRANSPORTER DATA CONNECTOR'
TYPE DATACONNECTOR CONSUMER
SCHEMA PRODARM_EIW_SCH
ATTRIBUTES
(
VARCHAR FileName = @filename,
VARCHAR OpenMode ='WriteAppend',
VARCHAR IndicatorMode ='N',
VARCHAR Format='DELIMITED',
VARCHAR QuotedData = 'Yes',
VARCHAR OpenQuoteMark = '"',
VARCHAR CloseQuoteMark = '"',
VARCHAR TextDelimiter =','
);

DEFINE OPERATOR EXPORT_OPERATOR()
DESCRIPTION 'TERADATA PARALLEL TRANSPORTER EXPORT OPERATOR'
TYPE EXPORT
SCHEMA PRODARM_EIW_SCH
ATTRIBUTES
(
INTEGER MaxSessions =32,
INTEGER MinSessions =1,
VARCHAR TdpId =@TD_HOST_ENTRY,
VARCHAR UserName =@TD_USER_NAME,
VARCHAR UserPassword=@TD_PASSWORD,
VARCHAR LogSql = 'Y',
VARCHAR ReportModeOn = 'Y',
VARCHAR SelectStmt = ' ....

);

APPLY TO OPERATOR (FILE_WRITER() )
SELECT * FROM OPERATOR (EXPORT_OPERATOR [4]);
);