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

How can I change the way SAS results are displayed in rsubmit-endrsubmit block? As attached, the two proc print provide the same results but in a different way. I prefer the former. The biggest issue I have about the latter is that it doesn't provide all columns side by side. I mean, variables from Make to Invoice are provided first, and then the other variables are provided.

At times, variable names are displayed vertically, which is also annoying to me (but not this case).

Thanks!

 

 

	proc print data= sashelp.cars (obs= 5); run;
	data cars; set sashelp.cars;run;

	rsubmit;
	proc upload data= cars ; run;
	proc print data= sashelp.cars (obs= 5); run;
	endrsubmit;

 

The SAS System

Obs Make Model Type Origin DriveTrain MSRP Invoice EngineSize Cylinders Horsepower MPG_City MPG_Highway Weight Wheelbase Length
1 Acura MDX SUV Asia All $36,945 $33,337 3.5 6 265 17 23 4451 106 189
2 Acura RSX Type S 2dr Sedan Asia Front $23,820 $21,761 2.0 4 200 24 31 2778 101 172
3 Acura TSX 4dr Sedan Asia Front $26,990 $24,647 2.4 4 200 22 29 3230 105 183

 


The SAS System

                                            Drive                      Engine                         
 Obs  Make   Model           Type   Origin  Train      MSRP   Invoice   Size                          
                                                                                                      
   1  Acura  MDX             SUV     Asia   All     $36,945   $33,337    3.5                          
   2  Acura  RSX Type S 2dr  Sedan   Asia   Front   $23,820   $21,761    2.0                          
   3  Acura  TSX 4dr         Sedan   Asia   Front   $26,990   $24,647    2.4                          
                                                                                                      
                                            MPG_                                                      
 Obs  Cylinders   Horsepower   MPG_City   Highway   Weight   Wheelbase   Length                       
                                                                                                      
   1      6           265         17         23      4451       106        189                        
   2      4           200         24         31      2778       101        172                        
   3      4           200         22         29      3230       105        183                        
1 ACCEPTED SOLUTION

Accepted Solutions
s_lassen
Meteorite | Level 14

It seems your remote platform is using ODS LISTING, while your local platform is using ODS HTML. If the remote platform supports it, you can try something like this:

rsubmit;
ods _ALL_ close;
ods HTML;

/* proc print statements here */

But if it does not, or you cannot see the HTML output, another possibility is to use a remote libname and print locally:

data cars; set sashelp.cars;run;

libname swork remote slibref=WORK server=<server name>;
rsubmit;
  proc upload data= cars ; run;
endrsubmit;

proc print data= swork.cars (obs= 5); run;

View solution in original post

2 REPLIES 2
s_lassen
Meteorite | Level 14

It seems your remote platform is using ODS LISTING, while your local platform is using ODS HTML. If the remote platform supports it, you can try something like this:

rsubmit;
ods _ALL_ close;
ods HTML;

/* proc print statements here */

But if it does not, or you cannot see the HTML output, another possibility is to use a remote libname and print locally:

data cars; set sashelp.cars;run;

libname swork remote slibref=WORK server=<server name>;
rsubmit;
  proc upload data= cars ; run;
endrsubmit;

proc print data= swork.cars (obs= 5); run;
braam
Quartz | Level 8
Thanks! The second one works for me.
The first one displayed no results, though.

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
  • 2 replies
  • 532 views
  • 0 likes
  • 2 in conversation