BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
rmalcata
Quartz | Level 8

Hi,

 

I am running a simple stored process the idea being to update a dataset as a result of the input from the prompts.
The code runs fine when I ran it in SAS EG. However, it gives me an error when I run it in SAS VA. 
Error message attached.

 

65        +data VALIBLA.churn_example1;

66        +set VALIBLA.churn_example;

67        +if tpid=&tpidvar then do;

                                 __

                                 22

ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, *, **, +, -, /, ;, <, <=, <>, =, >, ><, >=, AND, EQ, GE, GT, IN, LE, LT, MAX, MIN, NE, NG, NL, NOTIN, OR, ^=, |, ||, ~=. 

 

                                                                                          The SAS System

 

68        +            comments="&comments_var";

69        +            Phone_calls=&phone_call_var+0;

70        +            Customer_category="&customer_rating_var";

71        +            Customer_rating=substr("&customer_rating_var",1,1)+0;

72        +end;

           ___

           161

ERROR 161-185: No matching DO/SELECT statement.

 

73        +run;

 

Can someone tell me what I may be doing wrong?

It is the first time that I am using stored process, so there could be other errors.

 

Thanks!

 

Rita

1 ACCEPTED SOLUTION

Accepted Solutions
rmalcata
Quartz | Level 8

thanks for the reply.
I guess I just did not know how to run the stored process. By completing the parameters, it works.

What I had in mind was a buttom to call the stored process. By using a buttom bar, I cannot add an external link. Does anyone know how is this possible?
I guess I can use a graph as an alternative.

 

Cheers

 

Rita

View solution in original post

3 REPLIES 3
FredrikE
Rhodochrosite | Level 12

The macro variable tpidvar is blank so the if statement is if tdpid= then do and that will result in an error:

 

== My test log ==

24 data test;

25 set sashelp.class;

26 if sex= then do;

__

22

ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, *, **, +, -, /, ;, <, <=, <>, =, >, ><, >=, AND, EQ, GE, GT,

IN, LE, LT, MAX, MIN, NE, NG, NL, NOTIN, OR, ^=, |, ||, ~=.

27 put 'A';

28 end;

___

161

ERROR 161-185: No matching DO/SELECT statement.

29 run;

 

BR

Fredrik

rmalcata
Quartz | Level 8

Hi Fredrik,

 

Thaks for the quick reply.

 

The &tpidvar will be an input from the user when the stored process runs, it will pop-up the prompt menu, when the user will include such variables. Similar to this:
stored process pop-up prompt.PNG
Or does it work differently in SAS VA?

 

If I go to properties among the stored process menu in SAS VA, the process runs without a problem, but what I had in mind is that the user runs the process after adding the inputs.

this is just my lack of knowledge on how to use stored processes, how to do you have the stored process to run and ask input fromt he users?!

REgards,

Rita

rmalcata
Quartz | Level 8

thanks for the reply.
I guess I just did not know how to run the stored process. By completing the parameters, it works.

What I had in mind was a buttom to call the stored process. By using a buttom bar, I cannot add an external link. Does anyone know how is this possible?
I guess I can use a graph as an alternative.

 

Cheers

 

Rita

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!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 3112 views
  • 0 likes
  • 2 in conversation