Need help in creating pivot table using SAS EG

Reply
New Contributor
Posts: 2

Need help in creating pivot table using SAS EG

[ Edited ]

Hi All,

 

I have the below code to create a pivot table with following :

1) Page level fields with filters ( Mail Type and Mail Id ) 

2) Row feields and column fields 

3) Grand totals 

 

Am unable to clear the below errors :

ERROR 180-322: Statement is not valid or it is used out of proper order.

RROR 13-12: Unrecognized SAS option name NOXWAIT.

ERROR 13-12: Unrecognized SAS option name NOXSYNC.

 

Your input would be a great help .Please find the code below and the excel file is attached 

 

libname perm '/sasdata/pmuppidi/mysas/all_SAS_data';
ods path (prepend) work.templat(update);
%include "/sasdata/pmuppidi/mysas/pivot.js";
ods tagsets.ExcelXP file="/sasdata/pmuppidi/mysas/all_excel/poc1.xlsx" options(sheet_name="Sheet1");

proc print data=perm.poc1 noobs;
run;
ods tagsets.Excelxp close;
/* Create and execute the script file that is generated */
/* with the TableEditor tagset. */
ods noresults;
options noxwait noxsync;
ods tagsets.tableeditor file="/sasdata/pmuppidi/mysas/pivot.js"
options(update_target="//sasdata//pmuppidi//mysas//all_excel//poc1.xlsx" open_excel="no" output_type="script"
sheet_name="Sheet1" pivotdata="BELOW_12,12_16,17_20,ABOVE20"
pivotdata_stats="sum,sum,sum,sum" pivotcalc="none,none,none,total"
pivotpage="Mail type,Mail id" pivotrow="New,Repeat"
pivotdata_tocolumns="yes");
data _null_;
file print;
put "poc1";
run;
ods tagsets.tableeditor close;
x "cscript '/sasdata/pmuppidi/mysas/pivot.js'";

 

Super User
Posts: 5,429

Re: Need help in creating pivot table using SAS EG

Posted in reply to mpreddy123

Full log would help (with OPTIONS SOURCE2Smiley Wink

In what step do you get the error?

Data never sleeps
New Contributor
Posts: 2

Re: Need help in creating pivot table using SAS EG

Thanks for your reply . Please check the log below :

 

1 ;*';*";*/;quit;run;
2 OPTIONS PAGENO=MIN;
3 %LET _CLIENTTASKLABEL='Program (8)';
4 %LET _CLIENTPROJECTPATH='C:\Users\pmuppidi\Documents\Project sample4.egp';
5 %LET _CLIENTPROJECTNAME='Project sample4.egp';
6 %LET _SASPROGRAMFILE=;
7
8 ODS _ALL_ CLOSE;
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=HtmlBlue
15 STYLESHEET=(URL="file:///C:/Program%20Files/SASHome/SASEnterpriseGuide/7.1/Styles/HtmlBlue.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=HtmlBlue
24 STYLESHEET=(URL="file:///C:/Program%20Files/SASHome/SASEnterpriseGuide/7.1/Styles/HtmlBlue.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 /* Insert custom code before submitted code here */
34
35 libname perm '/sasdata/pmuppidi/mysas/all_SAS_data';
NOTE: Libref PERM was successfully assigned as follows:
Engine: V9
Physical Name: /sasdata/pmuppidi/mysas/all_SAS_data
36 ods path (prepend) work.templat(update);
37 %include "/sasdata/pmuppidi/mysas/pivot.js";
47 ods tagsets.ExcelXP file="/sasdata/pmuppidi/mysas/all_excel/poc1.xlsx" options(sheet_name="Sheet1");


48 proc print data=perm.poc1 noobs;
49 run;

NOTE: There were 28 observations read from the data set PERM.POC1.
NOTE: PROCEDURE PRINT used (Total process time):
real time 0.03 seconds
cpu time 0.04 seconds

50 ods tagsets.Excelxp close;
51 /* Create and execute the script file that is generated */
52 /* with the TableEditor tagset. */
53 ods noresults;
2 The SAS System 09:32 Thursday, November 12, 2015

54 options noxwait noxsync;
_______
13
ERROR 13-12: Unrecognized SAS option name NOXWAIT.

54 ! options noxwait noxsync;
_______
13
ERROR 13-12: Unrecognized SAS option name NOXSYNC.

55 ods tagsets.tableeditor file="/sasdata/pmuppidi/mysas/pivot.js"
56 options(update_target="//sasdata//pmuppidi//mysas//all_excel//poc1.xlsx" open_excel="no" output_type="script"
57 sheet_name="Sheet1" pivotdata="BELOW_12,12_16,17_20,ABOVE20"
58 pivotdata_stats="sum,sum,sum,sum" pivotcalc="none,none,none,total"
59 pivotpage="Mail type,Mail id" pivotrow="New,Repeat"
60 pivotdata_tocolumns="yes");
WARNING: Tagset TAGSETS.TABLEEDITOR not found; the default tagset will be used instead.
NOTE: Writing TAGSETS.DEFAULT Body file: /sasdata/pmuppidi/mysas/pivot.js
61 data _null_;
62 file print;
63 put "poc1";
64 run;

NOTE: 1 lines were written to file PRINT.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.01 seconds

65 ods tagsets.tableeditor close;
66 x "cscript '/sasdata/pmuppidi/mysas/pivot.js'"
66 ! ;
67
68 /* Insert custom code after submitted code here */
69
70 GOPTIONS NOACCESSIBLE;
71 %LET _CLIENTTASKLABEL=;
72 %LET _CLIENTPROJECTPATH=;
73 %LET _CLIENTPROJECTNAME=;
74 %LET _SASPROGRAMFILE=;
75
76 ;*';*";*/;quit;run;
77 ODS _ALL_ CLOSE;
78
79
80 QUIT; RUN;
81

Ask a Question
Discussion stats
  • 2 replies
  • 538 views
  • 0 likes
  • 2 in conversation