BookmarkSubscribeRSS Feed
Raugulis
Calcite | Level 5

when I run PROC FREQ in enterprise guide i get table like that:

1.jpg

Hovewer when i run it like sheduled process i get new extra column.

2.jpg

How to remove it?

3 REPLIES 3
TomKari
Onyx | Level 15

Post the log entry from your EG run that works the way you like it. Somehow, an option is being set that is eliminating the extra headings. It'll be really easy to figure out with the log.

 

Tom

Raugulis
Calcite | Level 5


6
7 ODS _ALL_ CLOSE;
8 ODS PROCTITLE;
9 OPTIONS DEV=ACTIVEX;
10 GOPTIONS XPIXELS=0 YPIXELS=0;
11 FILENAME EGHTML TEMP;
12 ODS HTML(ID=EGHTML) FILE=EGHTML
13 ENCODING='utf-8'
14 STYLE=Statistical
15 STYLESHEET=(URL="file:///U:/SASHOME94v2/x86/SASEnterpriseGuide/7.1/Styles/Statistical.css")
16 ATTRIBUTES=("CODEBASE"="http://www2.sas.com/codebase/graph/v94/sasgraph.exe#version=9,4")
17 NOGTITLE
18 NOGFOOTNOTE
19 GPATH=&sasworklocation
20 ;
NOTE: Writing HTML(EGHTML) Body file: EGHTML
21 FILENAME EGSR TEMP;
22 ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR
23 STYLE=Statistical
24 STYLESHEET=(URL="file:///U:/SASHOME94v2/x86/SASEnterpriseGuide/7.1/Styles/Statistical.css")
25 NOGTITLE
26 NOGFOOTNOTE
27 GPATH=&sasworklocation
28 ENCODING=UTF8
29 options(rolap="on")
30 ;
NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
31
32 GOPTIONS ACCESSIBLE;
33 /* -------------------------------------------------------------------
34 Code generated by SAS Task
35
36 Generated on: Monday, February 22, 2016 at 1:28:12 PM
37 By task: Table Analysis1
38
39 Input Data: Local:INTERDOC.SASvwBiopsyFlow
40 Server: Local
41 ------------------------------------------------------------------- */
42
43
44 /* Start of custom user code */
45 ods noproctitle;
46 /* End of custom user code */
47 TITLE;
48 FOOTNOTE;
49 FOOTNOTE1 "%TRIM(%QSYSFUNC(DATE(), NLDATE20.)) at %TRIM(%SYSFUNC(TIME(), TIMEAMPM12.))";
50 PROC FREQ DATA = INTERDOC.SASvwBiopsyFlow(FIRSTOBS=1 )
51 ORDER=INTERNAL
52 ;
53 BY VPC18;
54 TABLES ProfileCode * Day /
55 NOROW
56 NOCOL
2 The SAS System 13:28 Monday, February 22, 2016

57 NOPERCENT
58 NOCUM
59 SCORES=TABLE
60 ALPHA=0.05;
61 /* -------------------------------------------------------------------
62 End of task code
63 ------------------------------------------------------------------- */
64 RUN;

NOTE: There were 948 observations read from the data set INTERDOC.SASvwBiopsyFlow.
NOTE: PROCEDURE FREQ used (Total process time):
real time 1.14 seconds
cpu time 0.68 seconds

64 ! QUIT;

65 TITLE; FOOTNOTE;
66
67
68 GOPTIONS NOACCESSIBLE;
69 %LET _CLIENTTASKLABEL=;
70 %LET _CLIENTPROJECTPATH=;
71 %LET _CLIENTPROJECTNAME=;
72
73 ;*';*";*/;quit;run;
74 ODS _ALL_ CLOSE;
75
76
77 QUIT; RUN;
78

TomKari
Onyx | Level 15

Okay, it's clear, and I've been able to replicate it, but it's a little odd.

 

PROC FREQ normally always lists the statistic you ask for along the left margin; I wasn't able to get rid of it in the normal course of events.

 

BUT, you also use a "BY" variable (VPC18), which I assume has only one value. For some reason, under this circumstance, PROC FREQ drops the marginal statistic name.

 

To get the same behaviour, modify the code in the stored procedure to look like:

 

PROC FREQ DATA=xxx ORDER=INTERNAL;
BY VPC18;
TABLES ProfileCode * Day / NOROW NOCOL NOPERCENT NOCUM SCORES=TABLE ALPHA=0.05;
RUN;

 

and you'll get identical results.

 

Tom

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 3 replies
  • 1512 views
  • 0 likes
  • 2 in conversation