BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hello everyone,

I have a code in which I import data from a file and then I create a format using PROC FORMAT. But then every time I want to do some sort of output of the data I need to type [pre]FORMAT Var1 Var1. Var2 Var2. ...[/pre]

example:
[pre]OPTIONS FMTSEARCH= (FORMATS) ;
PROC PRINT data=TEMP;
format Region Region. Risk Risk. Economic_Health Economic_Health.;
RUN;
[/pre]

Is there any way to apply this format "permanently" so to speak?
1 REPLY 1
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Assign the associated format when you create the SAS variable (typically a DATA step?), either using a FORMAT or ATTRIB statement.

Scott Barry
SBBWorks, Inc.

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!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1172 views
  • 0 likes
  • 2 in conversation