BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,
I am new to SAS & want some help regarding this. I want to create a refdata from the original datasets. The refdata should have only one observation with all the values of the variables is set to missing, and so it shows only the data type. So how is this acheived?
4 REPLIES 4
Cynthia_sas
SAS Super FREQ
Hi:
Perhaps you just want a PROC CONTENTS variables list:

[pre]
proc contents data=sashelp.class;
title 'What are the Variables in SASHELP.CLASS?';
run;
[/pre]

cynthia
deleted_user
Not applicable
Thanks Cynthia.

But Proc content displays only the list of the variables.

What I wanted is how do I change the vaules of each variables in each dataset to missing so that I have only empty datasets just with Attirbutes? This is needed for comparing the datasets. I have around 25 datasets, so I need to cut down the time of doing it one by one.

Anyways, thanks for your help.
Doc_Duke
Rhodochrosite | Level 12
To compare data set attributes, youo coul dyse PROC COMPARE and tell it to suppress the record-level comparisons.

You could also use PROC CONTENTS and output the data structure and then use PROC COMPARE on the results.

Doc
deleted_user
Not applicable
Thanks for all your help.

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!

New Learning Events in April

 

Join us for two new fee-based courses: Administrative Healthcare Data and SAS via Live Web Monday-Thursday, April 24-27 from 1:00 to 4:30 PM ET each day. And Administrative Healthcare Data and SAS: Hands-On Programming Workshop via Live Web on Friday, April 28 from 9:00 AM to 5:00 PM ET.

LEARN MORE

Discussion stats
  • 4 replies
  • 955 views
  • 0 likes
  • 3 in conversation