How to load the case with given primary id

Discussions about CSEntry
sherrell
Posts: 397
Joined: April 2nd, 2014, 9:16 pm
Location: Washington, DC

Re: How to load the case with given primary id

Post by sherrell »

Hi Manish,

I have not reviewed your entire application, but I see you're declaring ~40 arrays at the beginning of your program with indices of 50,000. Of the 5 I checked, none were being referenced. If these arrays are not being used, they should be commented out/deleted (and if you do think you need them, I would then question why you need so many and of such a size).

>As each time the data entry starts first it creates case-list file from primary data file

I see you are using a .dat (text) file for your external (not primary) data file. While CSPro does build an index file (.csidx) of the cases to expedite things, a .csdb file would be faster, and would definitely facilitate R/Ws to the file. Is there a reason you are using a .dat file rather than .csdb?

Since you are doing this on a regular (monthly) basis, you might want to write an intermediate program to create this cumulative value at the end of each month so that interviewers load the already-calculated value, rather than calculating the (static?) value every time they launch CSEntry.

Sherrell
manishcspro
Posts: 67
Joined: June 26th, 2017, 2:15 pm

Re: How to load the case with given primary id

Post by manishcspro »

Thanks..
I will try accordingly..
Will inform you id the problem persist.
manishcspro
Posts: 67
Joined: June 26th, 2017, 2:15 pm

Re: How to load the case with given primary id

Post by manishcspro »

Hi sir,
Unable to load csdb file.
Perhaps something went wrong while in the process...
It throws warning....

I am still trying...
sherrell
Posts: 397
Joined: April 2nd, 2014, 9:16 pm
Location: Washington, DC

Re: How to load the case with given primary id

Post by sherrell »

What warning message do you get? Feel free to post your updated program here, or send to us at cspro@lists.census.gov

Sherrell
manishcspro
Posts: 67
Joined: June 26th, 2017, 2:15 pm

Re: How to load the case with given primary id

Post by manishcspro »

The error displayed while loading external file as .csdb format is attached here..
Attachments
error_while_loading_external_files_as csdb.jpg
error_while_loading_external_files_as csdb.jpg (52.64 KiB) Viewed 4023 times
sherrell
Posts: 397
Joined: April 2nd, 2014, 9:16 pm
Location: Washington, DC

Re: How to load the case with given primary id

Post by sherrell »

Hi Manish,

Well that's a pretty straight-forward message--CSPro doesn't usually make mistakes on this front. It's telling you that the datafile you're using doesn't match up with the dictionary. Were you modifying the file outside of CSPro, for example, using SQL or other software?

The only thing you can do to try and salvage the file is to load it in DataViewer, save it as .dat & .dcf files, and modify the dictionary and/or data file to get them to agree.

Sherrell
Post Reply