BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
ElJuancho
Calcite | Level 5

I'm getting the error below when trying to use a text defined prompt variable is SAS EG and Stored Process.  I tried a few methods to make the value usable but no luck so far. Any suggestion on how to fix this issue?  

 

Prompt/variable Assignment 

%let STRUCTURE = 4451227E;

 

143              WHERE t1.OVRHD_STRCTUR_NO IN (&Structure)
NOTE: Line generated by the macro variable "STRUCTURE".                                                                                          The SAS System

143        4747487E
                  _
                  22
                  202
ERROR 22-322: Syntax error, expecting one of the following: a numeric constant, a datetime constant, a missing value, ), ',', -, :.  
ERROR 202-322: The option or parameter is not recognized and will be ignored.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

 

Since your use of &Structure is not enclosed in quotes then it is not treated as a character value.

 

Try

 WHERE t1.OVRHD_STRCTUR_NO IN ("&Structure")

so the prompt is treated as text.

View solution in original post

2 REPLIES 2
ballardw
Super User

 

Since your use of &Structure is not enclosed in quotes then it is not treated as a character value.

 

Try

 WHERE t1.OVRHD_STRCTUR_NO IN ("&Structure")

so the prompt is treated as text.

ElJuancho
Calcite | Level 5
That was an easy fix.

Thanks a lot.

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 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 2 replies
  • 448 views
  • 0 likes
  • 2 in conversation