Question
· 19 hr ago

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)2
Log in or sign up to continue

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.cls... 

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>'