BookmarkSubscribeRSS Feed
advoss
Quartz | Level 8
I have come up with the following code to get the member names into the observations when I concatenate several members. I've looked, and other than using the open and fetch functions, I haven't found a function that I can use. Each member might have over a million rows of data, and I am not in a position to be able to ask that the member name be added to the table.

Thoughts?

Thank you.

DATA ABC;
SET JORDAN.G1INNETDEDG(IN=G1INNETDEDG)
JORDAN.G2INNETDEDG(IN=G2INNETDEDG)
JORDAN.G3INNETDEDG(IN=G3INNETDEDG)
JORDAN.G4INNETDEDG(IN=G4INNETDEDG);
ARRAY XMEMBERS {*} G1INNETDEDG G2INNETDEDG
G3INNETDEDG G4INNETDEDG ;
length whichmem $32;
WHICHMEM = '??';
DO I=1 to dim(Xmembers) while (whichmem = '??');
IF XMEMBERS{i} THEN WHICHMEM = VNAME(XMEMBERS{i});
END;
drop i;
RUN;
2 REPLIES 2
ArtC
Rhodochrosite | Level 12
The INDSNAME SET statement option might do the trick for you.
[pre]
data two;
set sashelp.shoes sashelp.class indsname=innames;
put innames=;
run;
[/pre]
advoss
Quartz | Level 8
Thanks, that's exactly what I need. Now I've just got to get SAS 9.2 installed on my workstation.

I appreciate your quick response.

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