Dear all,
I have been assigned to create a series of tables from a dataset using a PROC PRINT procedure. The tables are to be sorted by a variable CodCd (Cause of death). I have done this using a BY statement and a piece of the code I am using to do this is as follows:
TITLE1 "Blood Pressure Summaries by Race";
PROC PRINT DATA = HypAnl.Hypanalysis1;
BY CodCd;
ID SSN;
VAR WtLb BMI SBP;
RUN;
TITLE;
One of the resulting tables looks like this:
Blood Pressure Summaries by Race
Cause of Death Code=Heart Failure
SSN | SubjectWeight | BMI | Systolic BP |
418-15-3055 | 212 | 27.1 | 161 |
423-12-7794 | 164 | 24.1 | 155 |
424-92-9797 | 176 | 23.1 | 168 |
798-08-2998 | 143 | 23.2 | 155 |
986-08-2045 | 161 | 26.6 | 160 |
My question is if there is a procedure that can remove the sub-header "Cause of Death Code=Heart Failure" from the output table?
Thank you in advance.
Statement titlen ; clears all titles equal to or higher than n.
This reset also takes place if you set a title value such as: titlen 'Summary';
Look at the byline option.
If you remove that line totally, you don't know which data is in the table.
Because of where the title "Cause of Death Code = Heart Failure" is located, I would think that it is a secondary title which would have been created in a TITLE2 Statement somewhere earlier in your code. Try using TITLE1; and TITLE2; just before the section of code you provided to make sure that you are canceling all of the previously specified titles in your program!
For example:
TITLE1;
TITLE2;
TITLE1 ''Blood Pressure Summaries by Race";
...
TITLE;
Statement titlen ; clears all titles equal to or higher than n.
This reset also takes place if you set a title value such as: titlen 'Summary';
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.