Batch error report for current case

Discussions about CSEntry
Post Reply

Batch error report for current case

Post by davide » February 20th, 2013, 6:19 am


I would like to add the following feature to my data entry program:

When a case is finished by the data entry operator, a batch file is run automatically which creates an error report for the current case ONLY (so not all cases in the data file).

Does anyone have an idea what is the most efficient way of doing this? I don't really see yet how I could filter the data file to get the current case.


David Pap

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

Re: Batch error report for current case

Post by Gregory Martin » February 24th, 2013, 12:39 pm

The problem with your idea is that CSEntry, the data entry program, locks your data file, meaning that you will not be able to read it from a batch program until you stop data entry while in CSEntry (or close CSEntry completely).

One way to solve your problem is to:

1) Write a menu program that launches CSEntry, where the operator will enter a case. CSEntry will close after the single case is entered.
2) The menu program waits until CSEntry finishes.
3) Then the menu program launches the batch application, specifying the case to operate on using the Parameter attribute in the PFF file.
4) Your batch application only focuses on that case. In the preproc of your questionnaire level you would check if the ID is the one you want to process, and if not it would call the endcase statement to stop processing the case.

See attached for a simplified example of how you might do this. Run menu.pff to start the program.
(5.79 KiB) Downloaded 207 times


Re: Batch error report for current case

Post by davide » February 26th, 2013, 3:56 am

Thanks Gregory,
this works perfectly!


Post Reply