BookmarkSubscribeRSS Feed
vimal
SAS Employee
how we can change the Table name with the help of Macro.
like I want name like this
TABLE HUB_SANC FROM HUB_MIS
TABLE STATE_SANC FROM STATE_MIS
3 REPLIES 3
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
You can use a %LET statement to substitute a value using a macro variable name. Or if you have a macro, then you can invoke the macro supplying a macro variable value in parentheses.

Scott Barry
SBBWorks, Inc.

Introduction to the Macro Facility
http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/a002293969.htm
vimal
SAS Employee
WHEN I am using

%LET A= BANK;

THEN I got following error.
Please check let me know how I can change the name of my table



47 PROC SQL;
48 CREATE TABLE &A_MASTER_TO_DUMP AS SELECT DISTINCT (SUM(ACTUAL_DISBURSAL/10000000)) AS
_
22
________________
202
48 ! DISBURSAL,COUNT(ACTUAL_DISBURSAL)AS DISBURSE_COUNT,
WARNING: Apparent symbolic reference A_MASTER_TO_DUMP not resolved.
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string.

ERROR 202-322: The option or parameter is not recognized and will be ignored.

49 ADM1,Zone,Cluster,SOL_ID
50 FROM &A_MASTER_TO
WARNING: Apparent symbolic reference A_MASTER_TO not resolved.
50 FROM &A_MASTER_TO
_
22
ERROR 22-322: Syntax error, expecting one of the following: a name, a quoted string, (, CONNECTION, DICTIONARY.
3 The SAS System 09:50 Monday, August 10, 2009


50 FROM &A_MASTER_TO
___________
202
ERROR 202-322: The option or parameter is not recognized and will be ignored.
ieva
Pyrite | Level 9
Try using "." after calling macro:

CREATE TABLE &A._MASTER_TO_DUMP AS SELECT DISTINCT (SUM(ACTUAL_DISBURSAL/10000000)) AS

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 3 replies
  • 8403 views
  • 0 likes
  • 3 in conversation