The SAS Output Delivery System and reporting techniques

How to restore CROSSTABS proc template

Reply
Occasional Contributor
Posts: 10

How to restore CROSSTABS proc template

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.
SAS Super FREQ
Posts: 8,743

Re: How to restore CROSSTABS proc template

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.
Super Contributor
Posts: 394

Re: How to restore CROSSTABS proc template

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.
Ask a Question
Discussion stats
  • 2 replies
  • 807 views
  • 0 likes
  • 3 in conversation