BookmarkSubscribeRSS Feed
veblen
Calcite | Level 5
I seem to be too close to the trees on this problem and can't seem to resolve it. It is code that I have just inherited and that might be part of the problem.

what is this error message related to "The option or parameter is not recognized and will be ignored?"

Does it have to do with the setting and/or formatting and/ of FREDID?

Is there a quick fix or do I have some work ahead of me?

Please let me know if any additional info is required.

THANKS!!!

MLOGIC(VIEW55): %LET (variable name is FREDID)
1660 NOTE: Line generated by the invoked macro "VIEW55".
1661 766 CREATE TABLE &FREDID AS SELECT PAG AS PAGE_NUMBER,COU AS &FREDID FROM VIEWS55
1662 __
1663 202
1664 766 ! WHERE XXID="&FREDID";
1665 MPRINT(VIEW55): CREATE TABLE 43322 AS SELECT PAG AS PAGE_NUMBER,COU AS 43322 FROM VIEWS55 WHERE XXID="43322";
1666 ERROR 202-322: The option or parameter is not recognized and will be ignored.
1667
1668 NOTE: PROC SQL set option NOEXEC and wi

1668 NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
1669 NOTE: Line generated by the macro variable "FREDID".
1670 766 43322
1671 _____
1672 22
1673 ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string.

Here is the code:

PROC SQL PRINT;

%DO B=1 %TO &MHIDS;
%LET FREDID=%SCAN(&XXIDLIST,&B);

CREATE TABLE &FREDID AS
SELECT PAG AS PAGE_NUMBER,COU AS &FREDID
FROM VIEWS55
WHERE XXID="&FREDID";
%END;

QUIT;
2 REPLIES 2
Patrick
Opal | Level 21
Hi

It looks as if &FREDID resolves to "766 43322"
NOTE: Line generated by the macro variable "FREDID".
766 43322

That's not a string which you can use as valid table name name.
CREATE TABLE &FREDID.......

HTH
Patrick
veblen
Calcite | Level 5
Thanks Patrick! Your help is highly appreciated.

So the issue is with &FREDID being set as a valid table name.

I thought that might be the culprit but I wanted to confirm. Though, my eyes must have missed the two numbers or I'd of held off of the post.

Best Regards

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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