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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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