while you can (clumsily) script terminal sessions, it might be easier to connect to your db via odbc and use isql, or maybe even use the newer python capabilities to get your data out via a python script
Have a look at the Store and StoreFiles methods: https://docs.intersystems.com/irislatest/csp/documatic/%25CSP.Documatic....
especially when there are cases where the first few people per problem took hours for the split time and then there's a lot of people with sub 1 minute times. I won't go through the effort of looking through their code to see if they actually only had to do a one line change to solve the second part. i would call that suspicious.
Log in or create a new account to continue