Solved
Contributor
Posts: 24

# keep 1 record from multiple of pdbs

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.

Accepted Solutions
Solution
‎08-21-2017 02:25 PM
Posts: 1,831

## Re: keep 1 record from multiple of pdbs

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;``````

All Replies
Solution
‎08-21-2017 02:25 PM
Posts: 1,831

## Re: keep 1 record from multiple of pdbs

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;``````
Contributor
Posts: 24

## Re: keep 1 record from multiple of pdbs

Why yes...yes I do.

Thanks so much!

☑ This topic is solved.