BookmarkSubscribeRSS Feed
deleted_user
Not applicable
hi ,

i want to change the headings & layout of proc freq producing cross tabulation output.

how can i achieve it in sas9.1 ?
i did searched but every where they speak only about template onewayfreqs.
------------------------------------------------------------------------------
i also got

proc template;
define crosstabs Base.Freq.CrossTabFreqs;
define header myheader;
text " ";
end;
end;
run;


LOG--

%gaccessible;
12 ods path work.templat(write) SASUSER.TEMPLAT(UPDATE) SASHELP.TMPLMST(READ);
13 proc template;
14 edit base.freq.crosstabfreqs / store=work.templat(write);
ERROR: Unable to restore 'base.freq.crosstabfreqs' from template store!
15 edit h1;
ERROR: Unable to restore 'h1' from template store!
16 text " ";
____ ___
1 79
76
WARNING 1-322: Assuming the symbol TEST was misspelled as text.
ERROR 79-322: Expecting a DATA.
ERROR 76-322: Syntax error, statement will be ignored.
17 end;
WARNING: No template to store. Possible mismatched END statement.
18 end;
WARNING: No template to store. Possible mismatched END statement.
19 run;
NOTE: PROCEDURE TEMPLATE used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds



i think , this is for sas 9.2.
how can we do it in SAS 9.1
------------------------------------------------------------------------------------------------------------
regards
Avinash
6 REPLIES 6
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Did you start out with ODS by using "ODS TRACE ON;" to follow the SAS ODS processing? Also, here is a SAS 9.2 Enhancements page/link and your topic is called out with specifics.

Base SAS
Enhancements to Procedures for SAS 9.2
http://support.sas.com/rnd/base/new92/92procs.html#freq


Scott Barry
SBBWorks, Inc.
deleted_user
Not applicable
Hi ,
I tried the option
ods trace on;

here is what i got on log


Output Added:
-------------
Name: CrossTabFreqs
Label: Cross-Tabular Freq Table
Data Name:
Path: Freq.Table1.CrossTabFreqs
-------------

There is no template name.


The link you send is for SAS 9.2 but i am using SAS 9.1.

Regards
Avi
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Exactly my point - the SAS 9.2 support is different. Suggest you investigate the reply from Tim@SAS for an earlier SAS version technique.

Scott Barry
SBBWorks, Inc.
Tim_SAS
Barite | Level 11
The crosstabs template is not available in 9.1. However, check out the CROSSLIST option on the TABLES statement. It produces crosstabulation output in column format and there is an ODS template for it.
deleted_user
Not applicable
Hi Tim,

The Crosstab option is fine But I don't want the result in list format.
it uses Base.Freq.CrossList template.
but i want to use - Base.Freq.CrosstabFreq or simmilar to that ..
How do i write a template for Crosstab and use it with my proc freq.

Regards
Avi
Tim_SAS
Barite | Level 11
Sorry, Avi, but in 9.1 you can't. PROC FREQ does not use an external template for the crosstabs table in releases prior to 9.2.

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 Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 1447 views
  • 0 likes
  • 3 in conversation