1. Parse the output for " *** Query completet." using grep and use awk to extract the count 2. Write a NOTIFY exit and use it before each DML statement 3. Rewrite it to a Stored Procdure and use it's ACTIVITY_COUNT
A NOTIFY exit is written in C, there are examples in the BTEQ manual and the directory where BTEQ is installed. Within that C programm you can do whatever you want, including writing to a flat file or inserting into a table.
Before every command you set the NOTIFY and BTEQ passes information to it.
.if ACTIVITYCOUNT <> 0 then insert into db1.employee values (10,'sss',ACTIVITYCOUNT,current_timestamp(0)); insert into db1.employee values (10,'sss',ACTIVITYCOUNT,current_timestamp(0)); *** Failure 5628 Column ACTIVITYCOUNT not found in db1.employee. Statement# 1, Info =0 *** Total elapsed time was 1 second.
But still not clear, why am I not able to insert into the table. Could you tell me, where I am going wrong. Why ACTIVITYCOUNT value is not available after then ?