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

What i want to do is get a value from a variable in multiple pdb's.

 

code:

--

libname in0 '/aaa/bbb/ccc' ;

data temp0;
set
in0.z
in0.y
in0.x
in0.w
in0.v;
keep mmm;
run;

proc print data=temp0 (obs=5);
run;

--

 

so i want to see the value of mmm from z,y,x,w,v.  Im trying to do this as efficently as possible.  Any pointers on how to do with without multiple libname statements?  thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
Shmuel
Garnet | Level 18

Do you mean:

libname in0 '/aaa/bbb/ccc' ;
data temp0;
set
in0.z(obs=1)
in0.y(obs=1)
in0.x(obs=1)
in0.w(obs=1)
in0.v(obs=1)
;
keep mmm;
run;
proc print data=temp0 (obs=5);
run;

View solution in original post

2 REPLIES 2
Shmuel
Garnet | Level 18

Do you mean:

libname in0 '/aaa/bbb/ccc' ;
data temp0;
set
in0.z(obs=1)
in0.y(obs=1)
in0.x(obs=1)
in0.w(obs=1)
in0.v(obs=1)
;
keep mmm;
run;
proc print data=temp0 (obs=5);
run;
prolifious
Obsidian | Level 7

Why yes...yes I do.

 

Thanks so much!

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 630 views
  • 0 likes
  • 2 in conversation