Above is the exact format I am trying to achieve, but through my code listed below:
%let raw=P:\SAS\71342_example\Data\Raw Data Sets;
%let SASdat=P:\SAS\71342_example\Data\SAS Data Sets;
libname BookData "&SASdat";
filename RawData "&raw";
run;
proc contents data = sashelp.bweight varnum;
run;
My output has been this:
| The SAS System |
| 65536 |
| 62 |
| 1 |
| 817 |
| 790 |
| 0 |
| YES |
| C:\Program Files\SASHome\SASFoundation\9.4\core\sashelp\bweight.sas7bdat |
| 9.0401M6 |
| X64_SR12R2 |
| BUILTIN\Administrators |
| 4MB |
| 4128768 |
| Weight | Num | 8 | Infant Birth Weight |
| Black | Num | 8 | Black Mother |
| Married | Num | 8 | Married Mother |
| Boy | Num | 8 | Baby Boy |
| MomAge | Num | 8 | Mother's Age |
| MomSmoke | Num | 8 | Smoking Mother |
| CigsPerDay | Num | 8 | Cigarettes Per Day |
| MomWtGain | Num | 8 | Mother's Pregnancy Weight Gain |
| Visit | Num | 8 | Prenatal Visit |
| MomEdLevel | Num | 8 | Mother's Education Level |
Here the code, tested:
ods exclude enginehost;
proc contents data = sashelp.bweight varnum;
run;
ods exclude none;
Essentially I want to remove the Engine/Host information, and keep the other information
Above is the exact format I am trying to achieve, but through my code listed below:
%let raw=P:\SAS\71342_example\Data\Raw Data Sets;
%let SASdat=P:\SAS\71342_example\Data\SAS Data Sets;
libname BookData "&SASdat";
filename RawData "&raw";
run;
proc contents data = sashelp.bweight varnum;
run;
My output has been this. Essentially I want to remove the Engine/Host information and keep the other information, and I want it to look like the above output.
| The SAS System |
| 65536 |
| 62 |
| 1 |
| 817 |
| 790 |
| 0 |
| YES |
| C:\Program Files\SASHome\SASFoundation\9.4\core\sashelp\bweight.sas7bdat |
| 9.0401M6 |
| X64_SR12R2 |
| BUILTIN\Administrators |
| 4MB |
| 4128768 |
| Weight | Num | 8 | Infant Birth Weight |
| Black | Num | 8 | Black Mother |
| Married | Num | 8 | Married Mother |
| Boy | Num | 8 | Baby Boy |
| MomAge | Num | 8 | Mother's Age |
| MomSmoke | Num | 8 | Smoking Mother |
| CigsPerDay | Num | 8 | Cigarettes Per Day |
| MomWtGain | Num | 8 | Mother's Pregnancy Weight Gain |
| Visit | Num | 8 | Prenatal Visit |
| MomEdLevel | Num | 8 | Mother's Education Level |
If @Kurt_Bremser 's reply doesn't suit your needs,2 options:
1- Have your program edit the output report (HTML file for example) if you can
2- Use option out= and create the report yourself from the output dataset(s)
See here for the ODS table names, so you can select or exclude.
use ods select.
ods html;
ods select Attributes;
proc contents data = sashelp.bweight varnum;
run;
ods html close;
Here the code, tested:
ods exclude enginehost;
proc contents data = sashelp.bweight varnum;
run;
ods exclude none;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.
Ready to level-up your skills? Choose your own adventure.