BookmarkSubscribeRSS Feed
zz
Calcite | Level 5 zz
Calcite | Level 5

I created a report in a dataset on a number of datasets (report name 'study_datasets').  The report 'study_datasets' includes fields 'ds_name', 'field_name', etc.  I needed to also create a column indicating whether a field (field_name) is empty or not for all observations in any particular dataset (dataset_name).

 

For instance, the report 'study_datasets' has the following two variables:

 

DS_Name   Field_Name   

AE               AESPID          

AE               AESERN        

 

After running the program, the dataset will have an additonal 

DS_Name   Field_Name   Field_Empty

AE               AESPID          Yes

AE               AESERN        No

 

Anyone has done something like this?  Could you share your code, please?

 

Thank you very much in advance for your input, or sharing!

1 REPLY 1
Reeza
Super User

Yes this has been done before, multiple times 🙂

 

This has several solutions but is a bit garbled from the conversion to this forum versus their old software. 

https://communities.sas.com/t5/SAS-in-Health-Care-Related/Empty-vars/m-p/5393/highlight/true#M464

 

This is the better solutions IMO

https://communities.sas.com/t5/SAS-Procedures/How-do-I-list-all-unused-columns-in-a-dataset/m-p/5976...

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
  • 1 reply
  • 620 views
  • 0 likes
  • 2 in conversation