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

hii 

 

 am trying to learn sdtm programming by using the raw datasets. am trying to create a table for vital signs like this vitalsigns.PNG

am not able to create for vstestcd as they have shown can anyone please help me with this program

 

data temp;

set vs (keep= tempf tempu subjid VISITDT vstestcd vstest );

vstestcd="TEMP";

vstest="temperature"
run;

1 ACCEPTED SOLUTION

Accepted Solutions
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Please follow the guidance found under the post button when starting a question:
1) Post test data in the form of a datastep into a code window (its the {i} above post).  We do not have access to your machine, nor are here to type data in from a screenshot.:

https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat...

 

2) Post what the output from that test data should be.

 

3) Explain in detail what the problem is, you mention errors in the log, again, as we cannot see your computer you need to post the relevant log so that we can also see it.

 

Your code is syntactically correct as posted, however do note that every row of the data would be set to temperature.

View solution in original post

4 REPLIES 4
error_prone
Barite | Level 11
Maybe it is to early for my brain (6:52am) but I can't see the problem you have. Please post the data you have, want you want as result and explain the difference between both.
Aayushi_17
Quartz | Level 8

i want the output in this format vitalsigns.PNGCapture.PNG

but am not able to get the vstestcd its showing some error in this program

 

data temp;

set vs (keep= tempf tempu subjid VISITDT vstestcd vstest );

vstestcd="TEMP";
vstest="temperature"
run;

error_prone
Barite | Level 11
I don't have a crystal orb at hand, so I don't see the error message. Please post the log!
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Please follow the guidance found under the post button when starting a question:
1) Post test data in the form of a datastep into a code window (its the {i} above post).  We do not have access to your machine, nor are here to type data in from a screenshot.:

https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat...

 

2) Post what the output from that test data should be.

 

3) Explain in detail what the problem is, you mention errors in the log, again, as we cannot see your computer you need to post the relevant log so that we can also see it.

 

Your code is syntactically correct as posted, however do note that every row of the data would be set to temperature.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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