Question
· May 5, 2022

Add/Call objectscript xml class methods

Hi All,

I have been given the following  xml  class file with objectscript code that has methods that I need for file conversions. These method implementations will do necessary conversions but I don't know how to add it to Iris studio and run it as a task or maybe if it must be  put  on any location and call each method from the terminal and even if so how do I then call it.

Please advise how to go about this.

 

<?xml version="1.0" encoding="UTF-8"?>
<Export generator="IRIS" version="26" zv="IRIS for Windows (x86-64) 2020.1.1 (Build 408U)" ts="2022-02-01 16:19:05">
<Class name="User.Ready.ConvertCSV">
<Super>%RegisteredObject</Super>
<TimeChanged>66141,58621.837791</TimeChanged>
<TimeCreated>65814,24388.941304</TimeCreated>

<Method name="DoAll">
<ClassMethod>1</ClassMethod>
<Implementation>
</Implementation>
</Method>

<Method name="ConvertN">
<ClassMethod>1</ClassMethod>
<Implementation><![CDATA[
    </Implementation>
</Method>

<Method name="ConvertI">
<ClassMethod>1</ClassMethod>
<Implementation><![CDATA[
    s filename = "C:\ready\In\I\I.csv"
    s newFilename = "C:\ready\Out\I.csv"
    
]]></Implementation>
</Method>

<Method name="ConvertS">
<ClassMethod>1</ClassMethod>
<Implementation><![CDATA[
    s filename = "C:\ready\In\S\S.csv"
    s newFilename = "C:\ready\Out\S.csv"
    /Implementation>
</Method>
</Class>
</Export>

Product version: IRIS 2020.2
$ZV: HealthShare 2020.2 [HealthShare Modules: Active Analytics:20.0.8620 + Core:20.0.8620 + Patient Index:20.0.8620] - IRIS for UNIX (Red Hat Enterprise Linux for x86-64) 2020.1 (Build 217_1_20418U) Tue Nov 17 2020 15:48:44 EST
Discussion (6)3
Log in or sign up to continue

avoid loading anything into %SYS unless it is a class / routine that starts with a "z" ... everything else will be overwritten when you upgrade InterSystems IRIS.  If you ever want to class to be available to all namespaces, you can call it %z<some name> and load it into %SYS and then you can call it from all namespaces and it should survive an upgrade.

Let us know if you got it working!