I am currently using Stata 14.2 to execute a shell command but am running into an issue with the shell closing before the command is completed. A similar topic was previously discussed here:
https://www.stata.com/statalist/arch.../msg00295.html
However, the provided solution does not appear to work in my case.
Specifically, I am currently attempting to submit the following code:
The CsvGenerator.exe program is a multi-step program intended to search our company database for user information for an organization (which consists of several sub-organizations) and then ultimately exports the data as a .csv. The program is iterative in nature in that individual exports are created for each sub-organization which are then all appended together for the final full organization .csv export).
Is seems that due to this iterative nature, Stata will close the Windows shell as soon as the first operation within the CsvGenerator.exe is complete. As mentioned, a previously suggested solution is to include a check for the final .csv export or file creation before concluding. However, in my case, including this check does not appear to have convinced Stata to keep the shell open any longer. This is the version with the check in place:
I would appreciate any solutions for keeping the shell open so that the CsvGenerator.exe can complete all tasks instead of just the first one in its sequence.
https://www.stata.com/statalist/arch.../msg00295.html
However, the provided solution does not appear to work in my case.
Specifically, I am currently attempting to submit the following code:
Code:
shell CsvGenerator.exe orgs /// -s 08/01/2018 -e 06/10/2019 -c -u /// /*userloginaddress*/ /// /*organizationid*/
Is seems that due to this iterative nature, Stata will close the Windows shell as soon as the first operation within the CsvGenerator.exe is complete. As mentioned, a previously suggested solution is to include a check for the final .csv export or file creation before concluding. However, in my case, including this check does not appear to have convinced Stata to keep the shell open any longer. This is the version with the check in place:
Code:
capture noisily confirm file /*file path & name*/ while _rc { shell CsvGenerator.exe orgs /// -s 08/01/2018 -e 06/10/2019 -c -u /// /*userloginaddress*/ /// /*organizationid*/ }
Comment