How can I call $System.OBJ.Load() from a linux shell script? (Or $System.OBJ.Import, instead)
I need to run do $SYSTEM.OBJ.Load(<file from linux folder>,"ck") from a linux shell script.
How would I do that?
Product version: IRIS 2024.1
$ZV: USER>w $zv IRIS for UNIX (Red Hat Enterprise Linux 8 for x86-64) 2024.1.1 (Build 347_0_23928U) Tue Dec 3 2024 16:59:17 EST
Discussion (2)0
Comments
One way to do this would be to make use of the 'iris merge' command with a CPF file: https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cl…
The CPF file in question can run $SYSTEM.Obj.Load as an Action, for example:
[Actions]
Execute:Namespace="USER",ClassName=%SYSTEM.OBJ,MethodName="Load",Arg1="/home/irisowner/dev/cls/TestClass.xml",Arg2="ck"
So the steps here would be:
1. Define a CPF file that loads the classes you need
2. Create a unix script that runs 'iris merge <instance name> <CPF file location>'
Iris session can do it (assumes OS auth is enabled):
irissession <INSTANCE> -U<NAMESPACE> '##class(%SYSTEM.OBJ).Load("<file from linux folder>","ck")'Note that there must be no whitespaces in the command arg.