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


Hi Team,

When I write a format sometimes i might want to write for 25-30 variables. It might sometimes take 2 pages of the editor window. Is there any way to reduce it????

Like we do for the code by putting in a macro??

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Save the formats in a separate file and %include the file OR build a permanent format catalog.

View solution in original post

4 REPLIES 4
ballardw
Super User

Using a dataset using the CNTLIN.

Variables are the lenth issue but the number of formats and values or value ranges. If the values/ranges and display are the same then one format does for multiple variables. Otherwise an example of what you think might be reduced is a good idea.

I have some code files that only create formats that run over 2000 lines due to the number value ranges involved.

You can make permanent format catalogs by specifying the library option in proc format and then use the system option FMTSEARCH to tell SAS what order to search for saved formats.

art297
Opal | Level 21

Can you provide a brief example of what you want to reduce?

ballardw
Super User

Save the formats in a separate file and %include the file OR build a permanent format catalog.

robertrao
Quartz | Level 8

Great Help.

Thanks

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
  • 4 replies
  • 1442 views
  • 0 likes
  • 3 in conversation