Question
· Mar 29, 2021

$system.OBJ.Load -- Why does it sometimes not overwrite a .cls file?

Background: We have our own SQL map that predates InterSystems'. A program writes an XML file for each table map class as $system.OBJ.Export would. $system.OBJ.LoadDir loads the XML files into .cls files.

The reason is a long story, but we need to update parameter EXTENTSIZE (only) in existing classes. This does not seem to happen. As a test I used $system.OBJ.Export to make an XML file and edited EXTENTSIZE in the two places it appears in the XML:

<StorageStrategy>SQLStorage</StorageStrategy>
<Parameter name="EXTENTSIZE"><Default>1001</Default></Parameter>

<Storage name="SQLStorage">
<Type>%Storage.SQL</Type>
<ExtentSize>1001</ExtentSize>

This corresponds with the two places in the .cls file EXTENTSIZE appears:

Parameter EXTENTSIZE = 1000;

Storage SQLStorage
{
<ExtentSize>1000</ExtentSize>

Loading the XML file with $system.OBJ.Load did not update the .cls file; EXTENTSIZE stayed the same.

I ran the same test on Cache and IRIS and got the same result.

Does $system.OBJ.Load do any kind of checking before overwriting the .cls file? That is, does the utility "think" the XML is no different from the .cls file and skip overwriting the .cls file? Is there a flag that forces an overwrite? (I couldn't find one in the docs.) Is there a way to fool the utility?

Product version: IRIS 2020.1
$ZV: IRIS for Windows (x86-64) 2020.1 (Build 217_1U) Tue May 26 2020 20:41:06 EDT
Discussion (4)1
Log in or sign up to continue