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

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 4620 views
  • 0 likes
  • 2 in conversation