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
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;
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;
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.