BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
HitmonTran
Pyrite | Level 9

Does anyone know if this is a setting in SAS9.4 or is in in my proc report? 

 

Everytime I run my program it opens 15 excel outputs of each subjects.

%MACRO pp;
	%do i=1  %to &subj_n.;
		%let select_subj = %scan(&subj., &i., '#');  *Creating macro variables to select patients one by one;


		************************************************************************************************************************
		**********************************	Generating pdf reports with patients profiles	************************************
		************************************************************************************************************************;
		options;
		ods listing close;
		ods escapechar='^';
		ods tagsets.excelxp options(sheet_interval="NONE") file="Patient Profile Subject &select_subj..xml";
		*ods tagsets.ExcelXP file="Patient Profile Subject &select_subj..xml" style=statistical;
	
	*	ods html close;
		
	*	ods pdf file = "Patient Profile Subject &select_subj..pdf" startpage=no style= TLF_CN_9;
		option formchar="|----|+|---+=|-/\<>*" ls=70 ps=70 missing = " " nobyline nocenter nodate nonumber orientation=landscape;
		title; 
		title1 j=l "" j=r "DNDI-Master";
		title2 j=l "" j=r "Page ^{thispage} of ^{lastpage}";
		title3 j=c " ";
		title4 j=c "Patient Profile";
		title5;
		title6 j=l "Subject:&select_subj. 	";

		footnote;
		footnote1 j=l " ";
		footnote2 j=l " ";
		footnote3 j=l " ";
		footnote4 j=c "Patient Profile - MMB Request";
		footnote5 j=l "Program Name: &prname." j=c "Dataset Extraction Date: (&datextrt.)" j=r "Generation Date/Time: %sysfunc(today(), yymmdd10)/&systime.";

		*****	dm report	********;
		proc report data = dmlst.demographics (where=(sub_profile_id="&select_subj.")) split = "|" spacing = 3 missing nowindows headline headskip style(header)={textalign=l} spanrows;
			columns ("Dataset(s) : Demographics, Informedconsentconsenteme_2" sub_profile_id dsstdat version_id icprsubj age sex_decode race);
		
			define sub_profile_id /group left width = 38 "Subject ID";
			define dsstdat /display left width = 40 "Informed Consent Date|/dsstdat";
			define version_id /display left width = 40 "Protocol Version Number|/version_id";
			define icprsubj /display left width = 40 "Previous Subject Number|/icprsubj";
			define age /display left width = 40 "Age|/icprsubj";
			define sex_decode /display left width = 40 "Gender|/sex_decode";
			define race /display left width = 20 "Race|/multi vars";
		run;



	%end;
%mend pp;
*************************************************************************************************************************************************************
*************************************************************************	END OF MACRO *************************************************************
*************************************************************************************************************************************************************;
%pp;

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

If you are running the SAS Display Manage (Base or Foundation) the opening of each of these is because the default before have has been set that way.

You can check the menu:

Tools>Options>Preferences, go to the Results tab. If you see a group of options called Result Options and a check mark in the box before "View results as they are generated" that is the setting.

Uncheck the results and the file will quite opening. Until you go back re-check the box.

 

 

View solution in original post

3 REPLIES 3
SASKiwi
PROC Star

You need to post the SAS log with the SAS option MPRINT so we can see what is going on.

ballardw
Super User

If you are running the SAS Display Manage (Base or Foundation) the opening of each of these is because the default before have has been set that way.

You can check the menu:

Tools>Options>Preferences, go to the Results tab. If you see a group of options called Result Options and a check mark in the box before "View results as they are generated" that is the setting.

Uncheck the results and the file will quite opening. Until you go back re-check the box.

 

 

Reeza
Super User
It's a setting in SAS. Studio, EG and Base all have settings to stop the opening, usually under preferences somewhere. It's a "show results as generated" option.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 3 replies
  • 459 views
  • 2 likes
  • 4 in conversation