Programming the statistical procedures from SAS

FORMATS

Accepted Solution Solved
Reply
Super Contributor
Posts: 1,040
Accepted Solution

FORMATS


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


Accepted Solutions
Solution
‎10-03-2012 05:00 PM
Super User
Posts: 10,843

Re: FORMATS

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

View solution in original post


All Replies
Super User
Posts: 10,843

Re: FORMATS

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.

PROC Star
Posts: 7,416

Re: FORMATS

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

Solution
‎10-03-2012 05:00 PM
Super User
Posts: 10,843

Re: FORMATS

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

Super Contributor
Posts: 1,040

Re: FORMATS

Great Help.

Thanks

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 225 views
  • 0 likes
  • 3 in conversation