DATA Step, Macro, Functions and more

macro issuse: The parameter is not recognized and will be ignored

Reply
Contributor
Posts: 32

macro issuse: The parameter is not recognized and will be ignored

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;
Respected Advisor
Posts: 4,173

Re: macro issuse: The parameter is not recognized and will be ignored

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
Contributor
Posts: 32

Re: macro issuse: The parameter is not recognized and will be ignored

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
Ask a Question
Discussion stats
  • 2 replies
  • 232 views
  • 0 likes
  • 2 in conversation