Page 1 of 1

Batch file to Create new data file

Posted: November 14th, 2018, 4:36 am
by bmuganda
Hi all,

I have several csdb data files. I would like to write a batch script to extract some fields from the data files and generate into a new data file. Any ideas on how to go about this?


Thanks,

Re: Batch file to Create new data file

Posted: November 14th, 2018, 9:05 am
by Gregory Martin
You can do this using the Export Data tool. Select which fields that you want to extract and make sure that CSPro is selected as the Export Format. Will this work for you?

Re: Batch file to Create new data file

Posted: November 14th, 2018, 9:54 am
by bmuganda
Export Tool will work only for one dictionary, however in this case I have I have more than 5 dictionaries, and I would like to various extract fields from the five dictionaries into two combined dictionaries..

Re: Batch file to Create new data file

Posted: November 14th, 2018, 12:42 pm
by Gregory Martin
One option then is to have the output dictionary as an external dictionary to your batch application and then, for each case:

1) clear(DICT_NAME); This will clear any data in that dictionary.
2) Fill in variables in that dictionary.
3) writecase(DICT_NAME); Output the case.

Re: Batch file to Create new data file

Posted: November 15th, 2018, 12:25 am
by bmuganda
Thanks Greg,

Seems that's the way to go. Am trying out that.

Thanks