Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Gisung
Advisor
Advisor
0 Kudos

Hi

Here is a way to generate a monitoring file with date format suffix.

The Below Example is monitoring and generating the monitoring file for 10 hours at the 5 seconds interval with current date suffix.

begin

declare v_n int;   

declare @v_mode varchar(50);

declare @v_date date;

select getdate() into @v_date;

set @v_mode='-summary -interval 5 -file_suffix';

set v_n=1;

execute immediate 'iq utilities main into monitor_dummy start monitor '''||@v_mode|| ' ' ||@v_date||'''';

while v_n <= 10 loop

    waitfor delay '01:00:00';

rollback;

      set v_n=v_n+1;

    end loop;

iq utilities main into monitor_dummy stop monitor;

end ;

The monitoring file is generated as follows.

Ex) iqdemo.8-main-2014-12-24

HTH

Gi-Sung Jang