BookmarkSubscribeRSS Feed
pdhokriya
Pyrite | Level 9

Hi Reader,

 

How should I generate suppdm when for each subject I have multiple race and randomization dates.?

 

DM dataset : ( all charcter datatype)

SUBJIDRANDTCRACE
10012020-07-16T11:50:40ASIAN
1002 WHITE
10032020-07-21T11:18:18WHITE
10142020-08-06T09:45:53MULTIPLE
1015 WHITE
10162020-08-10T12:44:43WHITE
10172020-08-10T07:06:20WHITE
10172020-08-11T07:06:20WHITE
10172020-08-13T07:06:20WHITE

 

 

and I want suppdm i.e.

 

SUBJIDIDVARIDVARVALQNAMQLABELQVALQORIG
1014  RAC58AsianASIANCRF
1014  RAC84American Indian or Alaska NativeAMERICAN INDIAN OR ALASKA NATIVECRF
1017  RANDTCDate/Time of Randomization2020-08-10T12:44:43eDT
1017  RANDTCDate/Time of Randomization2020-08-10T07:06:20eDT
1017  RANDTCDate/Time of Randomization2020-08-11T07:06:20eDT

 

This is only few example. Here in my DM data I have arount 400records. So kindly share easy way to get suppdm ( with ot without sas macro).

 

Thankyou so much in advance. Take care.

 

Regards

Priya

 

 

7 REPLIES 7
Reeza
Super User
You're showing data not in the original table. Where does that come from?
You need to provide more details about your transformation logic and ideally show what you've tried as well. Looks like a TRANSPOSE to me but hard to know. Where does QNAM come from? QORIG???

If you're using a specific SAS tool - SAS Clinical or something this isn't the right forum to post your question.
pdhokriya
Pyrite | Level 9

QNAM and QORIG are the new variables which we need to create. Also QNAM and QORIG data details we need to add in programming.

pdhokriya
Pyrite | Level 9

New varibales need to create by considering raw data

QNAMQLABELQVALQORIG
Reeza
Super User
Ok. What is the transformation logic. Where does RAC58 come from based on the original data source? My guess is you have another look up table somewhere?
pdhokriya
Pyrite | Level 9

Yes I presume correctly. Look this data , where I can see multiple race for 1 perticular subjid.

 

RACESUBJIDRACE_1RACE_2RACE_58RACE_79RACE_84RANDTC
ASIAN1001  ASIAN  2020-07-16T11:50:40
WHITE1002WHITE     
WHITE1003WHITE    2020-07-21T11:18:18
BLACK OR AFRICAN AMERICAN1004 BLACK OR AFRICAN AMERICAN    
WHITE1005WHITE    2020-07-22T10:59:29
WHITE1006WHITE     
WHITE1007WHITE    2020-07-31T12:22:53
WHITE1008WHITE    2020-08-03T12:06:53
WHITE1009WHITE    2020-08-03T13:26:28
WHITE1010WHITE    2020-08-03T14:34:01
WHITE1011WHITE    2020-08-04T09:38:42
WHITE1012WHITE    2020-08-04T10:14:21
WHITE1013WHITE    2020-08-05T11:42:10
MULTIPLE1014WHITE ASIAN  2020-08-06T09:45:53
WHITE1015WHITE     
WHITE1016WHITE    2020-08-10T12:44:43
WHITE1017WHITE    2020-08-10T07:06:20
WHITE1019WHITE     
WHITE1020WHITE     
WHITE1021WHITE     
WHITE1022WHITE     
WHITE1023WHITE     
WHITE1024WHITE     
WHITE1026WHITE     
andreas_lds
Jade | Level 19

And now please post the data in usable for so that we have something to work with.

Reeza
Super User
I think you need to start back at the beginning. Please show what you originally start out, including all information, and what you want as output. Ideally you also show what you tried so we know what approaches your considering and your skill level to provide an appropriate solution.

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
  • 7 replies
  • 3106 views
  • 0 likes
  • 3 in conversation