BookmarkSubscribeRSS Feed
RobertF
Obsidian | Level 7

I'm getting the following error message when running the following code sample:

NOTE: Since no format is assigned, the numeric category variable will use the default of BEST6.
ERROR 22-322: Expecting a quoted string.  
ERROR 76-322: Syntax error, statement will be ignored.
WARNING: Object will not be saved.
NOTE: PROCEDURE SGPLOT used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds
      
NOTE: The SAS System stopped processing this step because of errors.

 

 

I'm trying to plot tick marks at every interval of 5 on the x-axis.

 

data PlotData;
input acute_los pdf_lognormal freq;
cards;
1 0.0028382038 0.0208009056
2 0.0394123739 0.0557874629
3 0.0898882158 0.088616103
4 0.1147283878 0.111999434
5 0.1165536045 0.1157138814
6 0.106458585 0.1264680911
7 0.0920588248 0.1169166549
8 0.0772850242 0.0679920758
9 0.0638413916 0.0464482807
10 0.0522891705 0.0413895571
11 0.0426588132 0.0303169662
12 0.0347629687 0.0287958115
13 0.0283468948 0.0240554691
14 0.0231559881 0.0240554691
15 0.0189626955 0.0139026461
16 0.0155743113 0.0097283147
17 0.0128323249 0.0092684307
18 0.0106084807 0.0068275081
19 0.0087999602 0.0068982595
20 0.0073247396 0.0064029999
21 0.0061175226 0.0057308618
22 0.0051263448 0.0042804585
23 0.0043098136 0.0029361823
24 0.0036349006 0.0032899392
25 0.0030751906 0.002617801
26 0.0026095013 0.0028300552
27 0.0022207973 0.0027593038
28 0.001895336 0.0024762983
29 0.0016219965 0.0021225414
30 0.0013917502 0.0017687845
;
run;

/* Overlay fitted Lognormal density with original data. */
title 'ACUTE_LOS count data overlaid with Lognormal fitted distributions for RPT_CTBH15041_CTPAR_CY2015_2017';
proc sgplot data=PlotData noautolegend;
    vbarparm category=ACUTE_LOS response=freq / legendlabel='ACUTE_LOS Count Data';
    series x=ACUTE_LOS y=pdf_lognormal / markers markerattrs=(symbol=circlefilled color=red size=1) 
                         lineattrs=(color=red)legendlabel='Fitted Lognormal PDF';
    xaxis values=(1 to 20 by 5);
    yaxis display=(nolabel);
    keylegend / location=inside position=NE across=1;
run;
title;
6 REPLIES 6
art297
Opal | Level 21

Running your code on 9.4 m5, on SAS UE, runs just fine! Gets the note about assigning a format for the one variable, but no error.

 

Which version of SAS are you using?

 

Art, CEO, AnalystFinder.com

 

RobertF
Obsidian | Level 7

I'm using SAS Enterprise Guide version 6.1 M1.

Reeza
Super User

You can find your SAS version with the following:

 

proc product_status;run;

You should see something like:

 

SAS 9.4 TS1M5PXXXXXX

 

More than likely you're using an old version, but the log and your version will help us figure out what you need to change. 

 

If you have any control/flexibility upgrades are included in your licensing fees. 

ballardw
Super User

Please: Post the code with the errors from the LOG, all one post, using the code box.

the 22_332 error code text will show a diagnostic _ under the place SAS is finding the error.

 

Since your version of EG looks a tad outdated I am going to suspect an SGPLOT option not available in an earlier release.

RobertF
Obsidian | Level 7

 

SAS output after running proc product_status; run; :

 

1                                                          The SAS System                               11:14 Monday, April 30, 2018

1          ;*';*";*/;quit;run;
2          OPTIONS PAGENO=MIN;
3          %LET _CLIENTTASKLABEL='MBHP Case Mix';
4          %LET _CLIENTPROJECTPATH='';
5          %LET _CLIENTPROJECTNAME='';
6          %LET _SASPROGRAMFILE=;
7          
8          ODS _ALL_ CLOSE;
9          OPTIONS DEV=ACTIVEX;
10         GOPTIONS XPIXELS=0 YPIXELS=0;
11         ODS LISTING GPATH=&sasworklocation;
12         FILENAME EGSR TEMP;
13         ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR
14             STYLE=HtmlBlue
15             STYLESHEET=(URL="file:///C:/Program%20Files/SAS94Home/SASEnterpriseGuide/6.1/Styles/HtmlBlue.css")
16             NOGTITLE
17             NOGFOOTNOTE
18             GPATH=&sasworklocation
19             ENCODING=UTF8
20             options(rolap="on")
21         ;
NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
22         
23         GOPTIONS ACCESSIBLE;


24         proc product_status;run;

For Base SAS Software ...
   Custom version information: 9.4_M1
   Image version information: 9.04.01M1P120413
For SAS/STAT ...
   Custom version information: 13.1
For SAS/GRAPH ...
   Custom version information: 9.4_M1
For SAS Integration Technologies ...
   Custom version information: 9.4_M1
For High Performance Suite ...
   Custom version information: 2.1_M1
For SAS/ACCESS Interface to PC Files ...
   Custom version information: 9.4_M1
For SAS/ACCESS Interface to ODBC ...
   Custom version information: 9.4_M1
NOTE: PROCEDURE PRODUCT_STATUS used (Total process time):
      real time           0.16 seconds
      cpu time            0.07 seconds
      

25         
26         GOPTIONS NOACCESSIBLE;
27         %LET _CLIENTTASKLABEL=;
28         %LET _CLIENTPROJECTPATH=;
29         %LET _CLIENTPROJECTNAME=;
30         %LET _SASPROGRAMFILE=;
31         
32         ;*';*";*/;quit;run;
33         ODS _ALL_ CLOSE;
34         
2                                                          The SAS System                               11:14 Monday, April 30, 2018

35         
36         QUIT; RUN;
37         

 

 

 

Here's the entire log output with errors from the proc sgplot execution:

 

1                                                          The SAS System                               11:14 Monday, April 30, 2018

1          ;*';*";*/;quit;run;
2          OPTIONS PAGENO=MIN;
3          %LET _CLIENTTASKLABEL='MBHP Case Mix';
4          %LET _CLIENTPROJECTPATH='';
5          %LET _CLIENTPROJECTNAME='';
6          %LET _SASPROGRAMFILE=;
7          
8          ODS _ALL_ CLOSE;
9          OPTIONS DEV=ACTIVEX;
10         GOPTIONS XPIXELS=0 YPIXELS=0;
11         ODS LISTING GPATH=&sasworklocation;
12         FILENAME EGSR TEMP;
13         ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR
14             STYLE=HtmlBlue
15             STYLESHEET=(URL="file:///C:/Program%20Files/SAS94Home/SASEnterpriseGuide/6.1/Styles/HtmlBlue.css")
16             NOGTITLE
17             NOGFOOTNOTE
18             GPATH=&sasworklocation
19             ENCODING=UTF8
20             options(rolap="on")
21         ;
NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
22         
23         GOPTIONS ACCESSIBLE;
24         data PlotData;
25         input acute_los pdf_lognormal freq;
26         cards;

NOTE: The data set WORK.PLOTDATA has 30 observations and 3 variables.
NOTE: DATA statement used (Total process time):
      real time           0.02 seconds
      cpu time            0.01 seconds
      
57         ;

58         run;
59         
60         /* Overlay fitted Lognormal density with original data. */
61         title 'ACUTE_LOS count data overlaid with Lognormal fitted distributions for RPT_CTBH15041_CTPAR_CY2015_2017';
62         proc sgplot data=PlotData noautolegend;
63             vbarparm category=ACUTE_LOS response=freq / legendlabel='ACUTE_LOS Count Data';
64             series x=ACUTE_LOS y=pdf_lognormal / markers markerattrs=(symbol=circlefilled color=red size=1)
65                                  lineattrs=(color=red)legendlabel='Fitted Lognormal PDF';
66             xaxis values=(1 to 20 by 5);
67             yaxis display=(nolabel);
68             keylegend / location=inside position=NE across=1;
69         run;

NOTE: Since no format is assigned, the numeric category variable will use the default of BEST6.
ERROR 22-322: Expecting a quoted string.  
ERROR 76-322: Syntax error, statement will be ignored.
WARNING: Object will not be saved.
NOTE: PROCEDURE SGPLOT used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds
      
NOTE: The SAS System stopped processing this step because of errors.
70         title;
2                                                          The SAS System                               11:14 Monday, April 30, 2018

71         
72         GOPTIONS NOACCESSIBLE;
73         %LET _CLIENTTASKLABEL=;
74         %LET _CLIENTPROJECTPATH=;
75         %LET _CLIENTPROJECTNAME=;
76         %LET _SASPROGRAMFILE=;
77         
78         ;*';*";*/;quit;run;
79         ODS _ALL_ CLOSE;
80         
81         
82         QUIT; RUN;
83         
art297
Opal | Level 21

I couldn't find anything in the documentation that indicated where the problem might have occurred, but did find the following technical note: http://support.sas.com/kb/54651.html

 

I'd suggest trying the following:

 

/* Overlay fitted Lognormal density with original data. */
title 'ACUTE_LOS count data overlaid with Lognormal fitted distributions for RPT_CTBH15041_CTPAR_CY2015_2017';
proc sgplot data=PlotData noautolegend;
    vbarparm category=ACUTE_LOS response=freq / legendlabel='ACUTE_LOS Count Data';
    series x=ACUTE_LOS y=pdf_lognormal / markers markerattrs=(symbol=circlefilled color=red size=1) 
                         lineattrs=(color=red)legendlabel='Fitted Lognormal PDF';
    xaxis values=('1' '6' '11' '16');
    yaxis display=(nolabel);
    keylegend / location=inside position=NE across=1;
run;

Art, CEO, AnalystFinder.com

 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 2237 views
  • 0 likes
  • 4 in conversation