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

hi .. another idea ...

data have;

input (ABC F1 F2 FDG)($);

cards;

ID Name Sex Country

1 ABC M IND

2 BCD F USA

3 CDE M GER

4 DGE M UK

;

filename nosee dummy;

data _null_;

file nosee;

set have (obs=1);

put (_all_) (=) @;

call symputx('rename',_file_);

run;

data have;

set have (firstobs=2 rename=(&rename));

run;

MikeZdeb
Rhodochrosite | Level 12

hi ... among the many things I have learned from Howard Schreier is neat stuff you can do with _FILE_ ...

http://www.listserv.uga.edu/cgi-bin/wa?A2=ind0811b&L=sas-l&P=23589

Linlin
Lapis Lazuli | Level 10

Hi Mike,

Thank you! I tried to help this OP to find a better solution: https://communities.sas.com/thread/34279

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 18 replies
  • 2799 views
  • 5 likes
  • 8 in conversation