Exploring, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

Stored Process error when running in SAS VA

Accepted Solution Solved
Reply
Contributor
Posts: 39
Accepted Solution

Stored Process error when running in SAS VA

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


Accepted Solutions
Solution
‎07-24-2017 07:55 PM
Contributor
Posts: 39

Re: Stored Process error when running in SAS VA

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


All Replies
Regular Contributor
Posts: 191

Re: Stored Process error when running in SAS VA

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

Contributor
Posts: 39

Re: Stored Process error when running in SAS VA

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

Solution
‎07-24-2017 07:55 PM
Contributor
Posts: 39

Re: Stored Process error when running in SAS VA

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

☑ This topic is solved.

Need further help from the community? Please ask a new question.

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