Page 1 of 1

Blank cases in csdb file

Posted: June 11th, 2021, 2:37 am
by eromjon
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?

Re: Blank cases in csdb file

Posted: June 11th, 2021, 8:29 am
by Gregory Martin
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;

Re: Blank cases in csdb file

Posted: June 12th, 2021, 3:21 pm
by eromjon
Thanks Greg.

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

Re: Blank cases in csdb file

Posted: June 14th, 2021, 9:50 am
by Gregory Martin
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.

Re: Blank cases in csdb file

Posted: August 19th, 2021, 4:54 pm
by SelmaAdam
I also had the same problem but now it's sorted .Thanks.