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

How would I change my proc report code so that instead of displaying "Division=East" it just displays "East". I basically just want to remove the "Division=" piece. Also, is there a way to remove the line that displays between groups?

 

data mydata;
infile datalines dlm="|";
Length Dept_Description $ 40 Division $5 Units 4;
Input Dept_Description Division Units;
datalines;
Red|East|1234
Blue|East|2546
Green|West|8495
Yellow|West|5162
;
title "report 1";
proc report data=mydata;
column Dept_Description Units;
by Division;
run; 

Current Output

report 1

Division=East
Dept_Description     Units
Red                 1234
Blue                 2546

--------------------------------------------------------------------------------
report 1

Division=West
Dept_Description     Units
Green                      8495
Yellow                      5162


Desired Output

report 1

East
Dept_Description     Units
Red                         1234
Blue                         2546


report 1

West
Dept_Description     Units
Green                      8495
Yellow                      5162

 

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

One way:

options nobyline;
title "report 1";
title3 #byval(division);
proc report data=mydata;
column Dept_Description Units;
by Division;
run;title; 

options byline; /*reset*/

View solution in original post

2 REPLIES 2
Reeza
Super User

I believe that's the BY title. You can specify NOBYLINE option and then customize it yourself. 

 

http://www2.sas.com/proceedings/sugi23/Coders/p75.pdf

 

 

ballardw
Super User

One way:

options nobyline;
title "report 1";
title3 #byval(division);
proc report data=mydata;
column Dept_Description Units;
by Division;
run;title; 

options byline; /*reset*/

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