how to get the log produced by a user-defined subroutine(fcmp)

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 19
Accepted Solution

how to get the log produced by a user-defined subroutine(fcmp)

I have a subroutine and it uses "run_macro" expression to execute a macro. But after execution I can't see normal data step execution statistics in the log. Instead of normal log it produces a log like

"NOTE: DATA statement used (Total process time):

      real time           0.06 seconds

      cpu time            0.09 seconds"

however the macro has data steps more than one. It abriges the log. I need full log.

/*SUBROUTINE DEFINITION*/

  subroutine setProcessTime(app $,log $);

       %include 'E:\................................\set_process_time.sas';

        rc = run_macro('set_process_time', app, log);     

   endsub;

/*MACRO*/

%macro set_process_time_test;

  data messi;

  put "SSSSSSSSSSSSSSSSSSS";

  a="&log";

  b="&app";

  run;

  data kaka;

  a=sleep(3,1);

  run;

  data carlos;

  a=10;

  b=15;

  run;

%mend set_process_time_test;

best regards


Accepted Solutions
Solution
‎09-25-2012 12:27 PM
Super User
Posts: 19,772

Re: how to get the log produced by a user-defined subroutine(fcmp)

Have you tried the symbolgen and mprint options before you submit the macro code?

options mprint symbolgen notes;

View solution in original post


All Replies
Solution
‎09-25-2012 12:27 PM
Super User
Posts: 19,772

Re: how to get the log produced by a user-defined subroutine(fcmp)

Have you tried the symbolgen and mprint options before you submit the macro code?

options mprint symbolgen notes;

Occasional Contributor
Posts: 19

Re: how to get the log produced by a user-defined subroutine(fcmp)

I have tried , but it doesn't work. Log is here...

10310  options cmplib = (ud.user_defined);

10311  data _null_;

10312      call setProcessTime('D:\....\include_by_fcmp_sample.sas','D:\....\include_by_fcmp_sample_log.txt');

10313  run;

YYYYYYYYYYYYYYYYYYY

SYMBOLGEN:  Macro variable LOG resolves to 'D:\..........\include_by_fcmp_sample_log.txt'

'D:\.......\include_by_fcmp_sample_log.txt'

MPRINT(SET_PROCESS_TIME):   data sss;

MPRINT(SET_PROCESS_TIME):   put "SSSSSSSSSSSSSSSSSSS";

MPRINT(SET_PROCESS_TIME):   a=5;

MPRINT(SET_PROCESS_TIME):   run;

SSSSSSSSSSSSSSSSSSS

SYMBOLGEN:  Macro variable LOG resolves to 'D:\......\include_by_fcmp_sample_log.txt'

MPRINT(SET_PROCESS_TIME):   filename rlog "'D:\.....\include_by_fcmp_sample_log.txt'";

MPRINT(SET_PROCESS_TIME):   proc printto new log=rlog;

MPRINT(SET_PROCESS_TIME):   run;

SYMBOLGEN:  Macro variable START resolves to 1664269555.661

SYMBOLGEN:  Macro variable FINISH resolves to 1664269555.698

MPRINT(SET_PROCESS_TIME):   proc sql;

SYMBOLGEN:  Macro variable APP resolves to 'D:\.....\include_by_fcmp_sample.sas'

SYMBOLGEN:  Macro variable START resolves to 1664269555.661

SYMBOLGEN:  Macro variable FINISH resolves to 1664269555.698

SYMBOLGEN:  Macro variable PROCESS_TIME resolves to İşlem süresi 0.0369999409 milisaniye

MPRINT(SET_PROCESS_TIME):   insert into prcstime.construction_process_times values('D:\.....\include_by_fcmp_sample.sas',1664269555.661,1664269555.698,"İşlem süresi

0.0369999409 milisaniye");

MPRINT(SET_PROCESS_TIME):   run;

NOTE: DATA statement used (Total process time):

      real time           0.04 seconds

      cpu time            0.04 seconds

Occasional Contributor
Posts: 19

Re: how to get the log produced by a user-defined subroutine(fcmp)

I have made a mistake , you were right , notes options has to be set : )

thanks...

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 229 views
  • 0 likes
  • 2 in conversation