Running Compiler to an output file

Primary tabs

Is there a way that when you run $system.OBJ.Compileall() that you can make the output written to a file instead of the screen? I am trying to capture all the errors so I can review the code and fix them before we upgrade.

Thanks

Scott

  • 0
  • 0
  • 93
  • 1
  • 3

Answers

Try using the errlog parameter, something like:

w $SYSTEM.OBJ.CompileAll(,.err)

https://irisdocs.intersystems.com/healthconnect20191/csp/documatic/%25CSP.Documatic.cls?PAGE=CLASS&LIBRARY=%25SYS&CLASSNAME=%25SYSTEM.OBJ#METHOD_CompileAll

Then you can pull the errors from the err variable and put it into a file however you want, for example using %Library.File.

https://irisdocs.intersystems.com/healthconnect20191/csp/documatic/%25CSP.Documatic.cls?PAGE=CLASS&LIBRARY=%25SYS&CLASSNAME=%25Library.File

Hope that helps!

Other answers are good. I'll also add, if you're running from Terminal, you can go to File > Logging... and have all the output logged to a file. (This works for other things that produce output too, not just CompileAll.)