BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Ramya2
Calcite | Level 5
If it is before looper, it will create log for each subject. I dont want the log to be created for each subject.
PaigeMiller
Diamond | Level 26

@Ramya2 wrote:
If it is before looper, it will create log for each subject. I dont want the log to be created for each subject.

I think this is incorrect. There is nothing in the code that will cause a log for each subject to be generated.

--
Paige Miller
Astounding
PROC Star

With all suggested changes:

 

%macro caller();

%do j=1 %to &npts;

 

%if  %sysfunc(mod(&j,3))=1 %then

%do;

proc printto new log ='"/ctshared/cdr/dev/RAMYA/archive/logfile_&j..log";

run;

%let rc=%sysfunc(sleep(60,1));

%end;

%looper(subject=&&pt&j.);

%end;

%mend caller();

 

Should be OK.  Try it and see.  Careful programming might eliminate an unnecessary SLEEP.

Ramya2
Calcite | Level 5
Wow. It is working fine. Thanks a lot for your suggestion.
Astounding
PROC Star

So that's closer.  Now move the %LOOPER macro as @PaigeMiller suggested.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 19 replies
  • 1830 views
  • 0 likes
  • 4 in conversation