BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
fatemeh
Quartz | Level 8

 Hi all ,

i am using a macro function and i used proc sql; creat table.....; proc print;run; .but it does not print the table ,no error ,i just can find the table in Explorer.why it does not print ?and the name of one of the  columns is  "NAME OF FORMER VARIABLE" .how can i chage it to one word name? i tried rename ,but because it is not single name ,it gives me error.if anyone knows the answer appreciate to share it with me.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

You're seeing the label not variable name most likely. 

 

Given what you've posted though we can't help. Obviously there's a mistake but without more details we can't tell you why.

 

When you're writing a macro you should start with working code. So if you haven't done that yet, I would suggest doing that first and then maybe comparing that to your macro to see where the differences are, and likely causing the issues. 

 

Use the debugging options to see the full code and it can help you see where/why the data set is not being created.

options notes symbolgen mprint;

View solution in original post

2 REPLIES 2
Shmuel
Garnet | Level 18

A variable cannot include spaces. If it includes you have to use it as 'var with space'n.

 

You may try do: (renmae = ("NAME OF FORMER VARIABLE"n = any_valid_name));

Reeza
Super User

You're seeing the label not variable name most likely. 

 

Given what you've posted though we can't help. Obviously there's a mistake but without more details we can't tell you why.

 

When you're writing a macro you should start with working code. So if you haven't done that yet, I would suggest doing that first and then maybe comparing that to your macro to see where the differences are, and likely causing the issues. 

 

Use the debugging options to see the full code and it can help you see where/why the data set is not being created.

options notes symbolgen mprint;

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
  • 760 views
  • 2 likes
  • 3 in conversation