Blank cases in csdb file

Discussions about editing and cleaning data
Post Reply
eromjon
Posts: 2
Joined: June 11th, 2021, 2:33 am

Blank cases in csdb file

Post by eromjon » June 11th, 2021, 2:37 am

Experienced a bizarre situation. I have a csdb file with blank cases. Even the ids are blank. File is attached. Any help how to get rid of these blank cases?
Attachments
ghphc2020listing_dict.zip
(1.18 MiB) Downloaded 30 times

Gregory Martin
Posts: 1536
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Blank cases in csdb file

Post by Gregory Martin » June 11th, 2021, 8:29 am

The first thing to do is ensure that your data entry applications are fixed to prevent this from happening.

You can get rid of them by passing them through a batch application:
PROC PHC2020LISTING_QUEST

   
if key(PHC2020LISTING_DICT) = "" then
        skip case
;
   
endif;
Or if you needed to do it in the field from a menu program:
forcase PHC2020LISTING_DICT where key(PHC2020LISTING_DICT) = "" do
    delcase
(PHC2020LISTING_DICT);
endfor;

eromjon
Posts: 2
Joined: June 11th, 2021, 2:33 am

Re: Blank cases in csdb file

Post by eromjon » June 12th, 2021, 3:21 pm

Thanks Greg.

Grateful if you could enlighten me on how do I ensure that my data entry application can prevent this to happen. Thanks

Gregory Martin
Posts: 1536
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Blank cases in csdb file

Post by Gregory Martin » June 14th, 2021, 9:50 am

There's no general advice on how to prevent your application from creating blank cases. You would have to look at your application to determine why blank cases are added. With my advice, I only meant that it is important to remove your cases, but it is also important to stop them from happening in the future.

SelmaAdam
Posts: 1
Joined: August 19th, 2021, 4:48 pm

Re: Blank cases in csdb file

Post by SelmaAdam » August 19th, 2021, 4:54 pm

I also had the same problem but now it's sorted .Thanks.

Post Reply