BookmarkSubscribeRSS Feed
acollot
Fluorite | Level 6

Bonjour,

 

J'utilise le logiciel SAS enterprise guide, n'ayant jamais appris à programmer en SAS. J'essaye de faire tourner un code simple (scatter plot) sur mon pc sous windows. Je n'ai aucun problème à importer les données mais en runnant ce code, j'obtiens plusieurs fois l'erreur "ERROR 180-322: Statement is not valid or it is used out of proper order.". Voici le code sorti par le logiciel :

 

/* -------------------------------------------------------------------
   Code generated by SAS Task
   By task: Scatter Plot

   Input Data: Local:WORK.ANIMALS_N1
   Server:  Local
   ------------------------------------------------------------------- */

%_eg_conditional_dropds(WORK.SORTTempTableSorted);
/* -------------------------------------------------------------------
   Sort data set Local:WORK.ANIMALS_N1
   ------------------------------------------------------------------- */

PROC SQL;
 CREATE VIEW WORK.SORTTempTableSorted AS
  SELECT T.body_weight_N, T.brain_weight_N
 FROM WORK.ANIMALS_N1 as T
;
QUIT;
 SYMBOL1
 INTERPOL=NONE
 HEIGHT=10pt
 VALUE=CIRCLE
 LINE=1
 WIDTH=2

 CV = _STYLE_
;
Axis1
 STYLE=1
 WIDTH=1
 MINOR=NONE


;
Axis2
 STYLE=1
 WIDTH=1
 MINOR=NONE


;
TITLE;
TITLE1 "Scatter Plot";
FOOTNOTE;
FOOTNOTE1 "Generated by the SAS System (&_SASSERVERNAME, &SYSSCPL) on %TRIM(%QSYSFUNC(DATE(), NLDATE20.)) at %TRIM(%SYSFUNC(TIME(), TIMEAMPM12.))";
PROC GPLOT DATA=WORK.SORTTempTableSorted
;
PLOT brain_weight_N * body_weight_N /
 VAXIS=AXIS1

 HAXIS=AXIS2

FRAME ;
/* -------------------------------------------------------------------
   End of task code.
   ------------------------------------------------------------------- */
RUN; QUIT;
%_eg_conditional_dropds(WORK.SORTTempTableSorted);
TITLE; FOOTNOTE;
GOPTIONS RESET = SYMBOL;

 

Auriez-vous une idée de des erreurs rencontrées ?

 

Merci d'avance.

13 REPLIES 13
malena
Calcite | Level 5
 
Reeza
Super User

@malena This wasn't your question?

acollot
Fluorite | Level 6

How do you fixed it ?

DaveShea
Lapis Lazuli | Level 10

Bonjour Acollot,

J'utilise Google Translate, alors pardonne la nature concise de cette réponse Smiley Happy

J'ai couru votre code sans aucune erreur. Il serait utile si vous pouvez exécuter le code à nouveau et, cette fois, afficher le SASLOG qui est produit au moment de l'exécution.

 

Lorsque vous postez votre réponse, collez le SASLOG dans la boîte spéciale "Insérer un code" qui apparaît lorsque vous cliquez sur le bouton de la barre d'outils qui ressemble à {i}. L'utilisation de cette boîte de code d'insertion rend votre SASLOG plus facile à lire.

************************************************************************;
*Create a dataset of Male Students and sort by Height.                  ;
*Créez un ensemble de données d'étudiants masculins et trier par taille.;
************************************************************************;
Data Male_Students;
 Set SASHELP.CLASS;
  
 Where Sex="M";
Run;

Proc Sort Data=Male_Students;
 By Height;
Run;

De plus, indiquez si vous obtenez l'erreur lorsque vous copiez le code SAS de la tâche graphique et l'exécutez séparément ou lorsque vous exécutez la tâche graphique. Je serais très surpris si la tâche graphique produisait une erreur de cette nature.

 

Cheers,

 

Downunder Dave

acollot
Fluorite | Level 6
1          ;*';*";*/;quit;run;
2          OPTIONS PAGENO=MIN;
3          %LET _CLIENTTASKLABEL='Scatter Plot';
4          %LET _CLIENTPROJECTPATH='';
5          %LET _CLIENTPROJECTNAME='';
6          
7          ODS _ALL_ CLOSE;
8          ODS PROCTITLE;
9          OPTIONS DEV=ACTIVEX;
10         FILENAME EGSR TEMP;
11         ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR
12             STYLE=HtmlBlue
13             STYLESHEET=(URL="file:///C:/Program%20Files%20(x86)/SASHome/x86/SASEnterpriseGuide/6.1/Styles/HtmlBlue.css")
14             NOGTITLE
15             NOGFOOTNOTE
16             GPATH=&sasworklocation
17             ENCODING=UTF8
18             options(rolap="on")
19         ;
NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
20         
21         /* -------------------------------------------------------------------
22            Code generated by SAS Task
23         
24            Generated on: Tuesday, October 14, 2014 at 8:53:02 PM
25            By task: Scatter Plot
26         
27            Input Data: Local:WORK.ANIMALS_N
28            Server:  Local
29            ------------------------------------------------------------------- */
30         
31         %_eg_conditional_dropds(WORK.SORTTempTableSorted);
32         /* -------------------------------------------------------------------
33            Sort data set Local:WORK.ANIMALS_N
34            ------------------------------------------------------------------- */
35         
36         PROC SQL;
37         	CREATE VIEW WORK.SORTTempTableSorted AS
38         		SELECT T.body_weight_N, T.brain_weight_N
39         	FROM WORK.ANIMALS_N as T
40         ;
NOTE: SQL view WORK.SORTTEMPTABLESORTED has been defined.
41         QUIT;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.11 seconds
      cpu time            0.01 seconds
      

42         	SYMBOL1
43         	INTERPOL=NONE
42         	SYMBOL1
            _______
            180
ERROR 180-322: Statement is not valid or it is used out of proper order.

44         	HEIGHT=10pt
45         	VALUE=CIRCLE
46         	LINE=1
2                                                          The SAS System                            20:52 Tuesday, October 14, 2014

47         	WIDTH=2
48         
49         	CV = _STYLE_
50         ;

51         Axis1
52         	STYLE=1
51         Axis1
           _____
           180
ERROR 180-322: Statement is not valid or it is used out of proper order.

53         	WIDTH=1
54         	MINOR=NONE
55         
56         
57         ;

58         Axis2
59         	STYLE=1
58         Axis2
           _____
           180
ERROR 180-322: Statement is not valid or it is used out of proper order.

60         	WIDTH=1
61         	MINOR=NONE
62         
63         
64         ;

65         TITLE;
66         TITLE1 "Scatter Plot";
67         FOOTNOTE;
68         FOOTNOTE1 "Generated by the SAS System (&_SASSERVERNAME, &SYSSCPL) on %TRIM(%QSYSFUNC(DATE(), NLDATE20.)) at
68       ! %TRIM(%SYSFUNC(TIME(), TIMEAMPM12.))";
69         PROC GPLOT DATA=WORK.SORTTempTableSorted
ERROR: Procedure GPLOT not found.
70         ;
71         PLOT brain_weight_N * body_weight_N /
72         	VAXIS=AXIS1
73         
74         	HAXIS=AXIS2
75         
76         FRAME ;
77         /* -------------------------------------------------------------------
78            End of task code.
79            ------------------------------------------------------------------- */
80         RUN;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE GPLOT used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      
80       !      QUIT;
81         %_eg_conditional_dropds(WORK.SORTTempTableSorted);

3                                                          The SAS System                            20:52 Tuesday, October 14, 2014


NOTE: View WORK.SORTTEMPTABLESORTED has been dropped.
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds
      

82         TITLE; FOOTNOTE;
83         GOPTIONS RESET = SYMBOL;
83         GOPTIONS RESET = SYMBOL;
           ________
           180
ERROR 180-322: Statement is not valid or it is used out of proper order.

84         
85         %LET _CLIENTTASKLABEL=;
86         %LET _CLIENTPROJECTPATH=;
87         %LET _CLIENTPROJECTNAME=;
88         
89         ;*';*";*/;quit;run;
90         ODS _ALL_ CLOSE;
91         
92         
93         QUIT; RUN;
94         

Good evening,

 

First, thanks for your answer. I can easily understand english (that's better than google translate 😉 ) but I have some difficulies wrinting it. Here is the logSAS with the errors. I am not sure that I have understood the last part of your message. I have run the code with the button "scatter plot" and also with the "run" button in the code window.

 

Thanks,

 

Acollot.

DaveShea
Lapis Lazuli | Level 10

Bonjour Acollot,

 

Phew, il est bon d'écrire de l'anglais à nouveau!

 

I have stripped the SAS code from the SASLOG that you posted and run it in my SAS Enterprise Guide exactly as it was. I get no ERRORs or WARNINGs and the scatter plot is created. Consequently, I am a bit puzzled as to what is happening for you.

 

I have attached my version of the SAS code to this reply. Perhaps you could open a new SAS Enterprise Guide session, create your WORK.ANIMALS_N dataset and then try running the attached code and see if you get a run without errors.

 

I notice that the code you are running is code that you generated a few years ago (the SASLOG shows "Generated on: Tuesday, October 14, 2014 at 8:53:02 PM"). I assume that you cut out the SAS code from the Scatterplot Task and saved the code to be submitted as stand-alone SAS code, and it is then when you get the ERROR message. I wonder if some characters have accidentally got into the code which is causing the ERROR message?

 

Please try this attached code out and post a reply to show how you got on.

 

Cheers,

 

Downunder Dave.

 

acollot
Fluorite | Level 6

Hello DaveShea,

 

I've tried your code and here is the logSAS I have had :

1                                                          The SAS System                            20:52 Tuesday, October 14, 2014

1          ;*';*";*/;quit;run;
2          OPTIONS PAGENO=MIN;
3          %LET _CLIENTTASKLABEL='Acollot 2017-04-07 Version 03';
4          %LET _CLIENTPROJECTPATH='';
5          %LET _CLIENTPROJECTNAME='';
6          %LET _SASPROGRAMFILE='C:\Users\Alice\Downloads\Acollot 2017-04-07 Version 03.sas';
7          
8          ODS _ALL_ CLOSE;
9          OPTIONS DEV=ACTIVEX;
10         FILENAME EGSR TEMP;
11         ODS tagsets.sasreport13(ID=EGSR) FILE=EGSR
12             STYLE=HtmlBlue
13             STYLESHEET=(URL="file:///C:/Program%20Files%20(x86)/SASHome/x86/SASEnterpriseGuide/6.1/Styles/HtmlBlue.css")
14             NOGTITLE
15             NOGFOOTNOTE
16             GPATH=&sasworklocation
17             ENCODING=UTF8
18             options(rolap="on")
19         ;
NOTE: Writing TAGSETS.SASREPORT13(EGSR) Body file: EGSR
20         
21         /* -------------------------------------------------------------------
22            Code generated by SAS Task
23         
24            Generated on: Tuesday, October 14, 2014 at 8:53:02 PM
25            By task: Scatter Plot
26         
27            Input Data: Local:WORK.ANIMALS_N
28            Server:  Local
29            ------------------------------------------------------------------- */
30         
31         %_eg_conditional_dropds(WORK.SORTTempTableSorted);
32         /* -------------------------------------------------------------------
33            Sort data set Local:WORK.ANIMALS_N
34            ------------------------------------------------------------------- */
35         
36         PROC SQL;
37         	CREATE VIEW WORK.SORTTempTableSorted AS
38         		SELECT T.body_weight_N, T.brain_weight_N
39         	FROM WORK.ANIMALS_N as T
40         ;
NOTE: SQL view WORK.SORTTEMPTABLESORTED has been defined.
41         QUIT;
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.01 seconds
      cpu time            0.01 seconds
      

42         
43         	SYMBOL1
44         	INTERPOL=NONE
43         	SYMBOL1
            _______
            180
ERROR 180-322: Statement is not valid or it is used out of proper order.

45         	HEIGHT=10pt
46         	VALUE=CIRCLE
2                                                          The SAS System                            20:52 Tuesday, October 14, 2014

47         	LINE=1
48         	WIDTH=2
49         
50         	CV = _STYLE_
51         ;

52         
53         Axis1
54         	STYLE=1
53         Axis1
           _____
           180
ERROR 180-322: Statement is not valid or it is used out of proper order.

55         	WIDTH=1
56         	MINOR=NONE
57         
58         
59         ;

60         
61         Axis2
62         	STYLE=1
61         Axis2
           _____
           180
ERROR 180-322: Statement is not valid or it is used out of proper order.

63         	WIDTH=1
64         	MINOR=NONE
65         ;

66         
67         TITLE;
68         TITLE1 "Scatter Plot";
69         FOOTNOTE;
70         FOOTNOTE1 "Generated by the SAS System (&_SASSERVERNAME, &SYSSCPL) on %TRIM(%QSYSFUNC(DATE(), NLDATE20.)) at
70       ! %TRIM(%SYSFUNC(TIME(), TIMEAMPM12.))";
71         PROC GPLOT DATA=WORK.SORTTempTableSorted
ERROR: Procedure GPLOT not found.
72         ;
73         PLOT brain_weight_N * body_weight_N /
74         	VAXIS=AXIS1
75         
76         	HAXIS=AXIS2
77         
78         FRAME ;
79         /* -------------------------------------------------------------------
80            End of task code.
81            ------------------------------------------------------------------- */
82         RUN;

NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE GPLOT used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      
83         QUIT;
3                                                          The SAS System                            20:52 Tuesday, October 14, 2014

84         %_eg_conditional_dropds(WORK.SORTTempTableSorted);


NOTE: View WORK.SORTTEMPTABLESORTED has been dropped.
NOTE: PROCEDURE SQL used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

85         
86         TITLE; FOOTNOTE;
87         GOPTIONS RESET = SYMBOL;
87         GOPTIONS RESET = SYMBOL;
           ________
           180
ERROR 180-322: Statement is not valid or it is used out of proper order.

88         
89         
90         %LET _CLIENTTASKLABEL=;
91         %LET _CLIENTPROJECTPATH=;
92         %LET _CLIENTPROJECTNAME=;
93         %LET _SASPROGRAMFILE=;
94         
95         ;*';*";*/;quit;run;
96         ODS _ALL_ CLOSE;
97         
98         
99         QUIT; RUN;
100        

 

Thanks,

 

Acollot

DaveShea
Lapis Lazuli | Level 10

Bonjour Acollot,

 

There is something a bit odd about the Communities page today as your most recent reply has not appeared although I saw it in my notification eMail.

 

I think that this error message shown in your SASLOG just after the Proc GPlot statement in your code might be the problem:

ERROR: Procedure GPLOT not found.

I wonder if there is a problem with either the SAS licence at your site or a problem with the installation of SAS at your site ? I think you should contact your SAS site representative or failing that SAS Technical Support in your country and send them the code and the SASLOG pointing out the error message.

 

I think the first error message that you see as a result of the SYMBOL statement:

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

may just be a symptom of the second error message regarding SAS GPlot.

 

I am sorry that I could not be of more help here.

 

Cheers,

 

Downunder Dave.

Reeza
Super User

The later errors would suggest @DaveShea is correct, you don't have a SAS\Graph license with this installation for some reason. 

Either it's no longer purchased by your company, or was not installed correctly, or possibly a Java issue. 

 

Check the licensing and installation status using the following:

 

proc product_status;

run;

 

proc setinit; run;

acollot
Fluorite | Level 6

Hello,

 

First, thanks DaveShea for your help. I'll see with my company.

 

Here is the logSAS of your code Reeza :

 

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

For Base SAS Software ...
   Custom version information: 9.4
   Image version information: 9.04.01M0P061913
NOTE: PROCEDURE PRODUCT_STATUS used (Total process time):
      real time           0.00 seconds
      cpu time            0.00 seconds
      

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

24         proc setinit;

24       !               run;
25         
26         %LET _CLIENTTASKLABEL=;
27         %LET _CLIENTPROJECTPATH=;
28         %LET _CLIENTPROJECTNAME=;
29         %LET _SASPROGRAMFILE=;
30         
31         ;*';*";*/;quit;run;
32         ODS _ALL_ CLOSE;
33         
34         
35         QUIT; RUN;
36 

 

Could you tell me if this is the problem, that it is not installed correctly?

 

Have a nice day,

 

acollot

Reeza
Super User

Is this a new EG installation? It looks like something may have gone wrong somewhere or did you remove information from the log?

acollot
Fluorite | Level 6

I don't think so, this is the version 6.1 of EG. No, I wrote the entire log I had received.

Tom
Super User Tom
Super User

Looks like you have some strange character on line 23. Probablly way out at the end of the line since the SAS log is showing two lines for input line 23.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 13 replies
  • 2481 views
  • 3 likes
  • 5 in conversation