BookmarkSubscribeRSS Feed
AshP
Calcite | Level 5
I fiddled around with some PROC TEMPLATE code to customize crosstabs for a report I was outputting. Unfortunately, it seems to have permanently saved those modifications.

Now every time I run a crosstab using PROC FREQ, SAS gives me the following error message and refuses to output the table to ODS RTF.

ERROR: The format COLFG was not found or could not be loaded.

I only get this error when I run PROC FREQ in combination with ODS RTF. If I run PROC FREQ alone, the cross-tab is properly printed to the output window.
2 REPLIES 2
Cynthia_sas
Diamond | Level 26
Hi:
What was your ODS PATH statement when you "fiddled" around??? If you did not have an ODS PATH statement, then that means your updated CROSSTAB template was stored in SASUSER.TEMPLAT item store.

The good news is that you can tell ODS to use the "production" templates by issuing an ODS PATH statement of:
[pre]
ods path sashelp.tmplmst(read);
[/pre]

That should take your updated item store out of the search path for template usage -- and use the "production" template.

If you did something like this when you fiddled around, however:
[pre]
ods path sashelp.tmplmst(update);
[/pre]

then you permanently modified the SAS-supplied template for CROSSTAB template -- in this case, you will need to open a track with Tech Support to find the safest way to restore the template store ... in some instances, this is an easy process, but in other instances, depending on where SAS is installed and what other products you have, the restore might be a bit more complicated.

cynthia

PS: I am writing this postscript to explicitly warn all readers of this post that you should NEVER define the access for SASHELP.TMPLMST as anything other than READ access. All updated templates should be stored in SASUSER.TEMPLAT or in an item store in a permanent or temporary library. Again: SASHELP.TMPLMST should always be defined with READ access on an ODS PATH statement.
Tim_SAS
Barite | Level 11
It depends on where you stored your custom template. The templates that SAS ships are stored in the template store SASHELP.TMPLMST. It's unlikely you have write-access to the SASHELP library, so the original crosstabs template is still there. Probably your custom template is stored in SASUSER.TEMPLAT. If that's the case, deleting your custom template from SASUSER.TEMPLAT will let you go back to using the original version.

If your custom crosstabs template is the only template in SASUSER.TEMPLAT, just delete the entire template store. If there are templates other than that one in SASUSER.TEMPLAT, and you want to keep them, you'll need to use PROC TEMPLATE to delete just the crosstabs template. You should probably contact Tech. Support for more help.

If you have actually replaced the original crosstabs template in SASHELP.LIBRARY with your own, you'll have to re-install the original templates. You'll definitely have to contact Tech. Support.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 2370 views
  • 0 likes
  • 3 in conversation