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'; 

sas-innovate-2024.png

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.

 

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
  • 3 replies
  • 1011 views
  • 2 likes
  • 3 in conversation