Page 1 of 1

Batch error report for current case

Posted: February 20th, 2013, 6:19 am
by davide
Hello,

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.

Thanks,

David Pap

Re: Batch error report for current case

Posted: February 24th, 2013, 12:39 pm
by Gregory Martin
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.

Re: Batch error report for current case

Posted: February 26th, 2013, 3:56 am
by davide
Thanks Gregory,
this works perfectly!

David