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

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 1434 views
  • 0 likes
  • 3 in conversation