How do I call IRIS, then run a few commands from it, using a Windows Batch script?

Hi guys,

Mostly the title.  Let's say my commands are stored in a text file "inFile".  Here was my best guess:

<dir to iris> console IRIS2018 <inFile

For reference, here's an example of the analogous structure that works on Cache:

C:\InterSystems\Cache2018\bin\cache -s C:\InterSystems\Cache2018\mgr -U <namespace to start as> <inFile

I think the problem is this:  When the Cache prompt is started, it opens in the same terminal as the line that started it, so passing inFile to standard input effectively types out inFile's lines as login info or commands in Cache.  In IRIS on the other hand, "console" opens a new terminal window, and thus the standard input from the terminal that opened the console (I'm assuming here) isn't the input to this new console.

Anyway, my thought was that maybe I can make an IRIS routine that just does what the lines in inFile do, and then call that, but I'm not exactly sure how, since they're calls like ##class(<class I wrote>).MethodIWrote()

Is passing lines of text to standard input doomed as a way of interacting with IRIS via Windows Batch?  If so, how should the Batch script log into iris to run commands?

Thanks guys.

  • 0
  • 0
  • 38
  • 0
  • 2

Answers