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

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

SSNSubjectWeightBMISystolic BP
418-15-305521227.1161
423-12-779416424.1155
424-92-979717623.1168
798-08-299814323.2155
986-08-204516126.6160

 

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.

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisNZ
Tourmaline | Level 20

@steeleye 

Statement title clears all titles equal to or higher than n.

This reset also takes place if you set a title value such as:  titlen 'Summary'; 

View solution in original post

3 REPLIES 3
ChrisNZ
Tourmaline | Level 20

Look at the byline option.

If you remove that line totally, you don't know which data is in the table.

steeleye
Fluorite | Level 6

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; 

ChrisNZ
Tourmaline | Level 20

@steeleye 

Statement title clears all titles equal to or higher than n.

This reset also takes place if you set a title value such as:  titlen 'Summary'; 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1868 views
  • 2 likes
  • 3 in conversation