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

Is there a way to use a format a title similarly to how data can be formatted?

The closest thing in syntax I can think of that does not work is.

title="%Put(&max_level_name sLev.)  only";

1 ACCEPTED SOLUTION

Accepted Solutions
data_null__
Jade | Level 19
proc format;
  
value dLvl 1='Baccalaureate';
  
run;
title "Only %sysfunc(putn(1,dlvl))";
proc print data=sashelp.class;
   run;

View solution in original post

5 REPLIES 5
data_null__
Jade | Level 19

There are options to control the look of the text in a title statement and you can also put BY variables and their values in titles.

SAS(R) 9.4 ODS Graphics: Procedures Guide, Fourth Edition

DavidPhillips2
Rhodochrosite | Level 12

Rewording a little.

In SAS 9.2 I’m trying to make a title statement of

Title = “only 1”;

To display

Only Baccalaureate

Using a structure like

value dLvl

1='Baccalaureate';

data_null__
Jade | Level 19
proc format;
  
value dLvl 1='Baccalaureate';
  
run;
title "Only %sysfunc(putn(1,dlvl))";
proc print data=sashelp.class;
   run;
DavidPhillips2
Rhodochrosite | Level 12

Data null,

Thanks for helping me out. I was querying the value or storing the value without needing to, this will help with efficiency.

data_null__
Jade | Level 19

Alternatively.

data class;
   set sashelp.class;
   retain dlvl 1;
proc format;
  
value dLvl 1='Baccalaureate';
  
run;
options byline=0;
title "Only #byval1";
proc print data=class;
   by dlvl;
   format dlvl dlvl.;
  
run;
options byline=1;

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 1595 views
  • 1 like
  • 2 in conversation