1. create a wrapper class with classmethods mapping to your routine(s)

or better

2. convert your routines to classes

then use $CLASSMETHOD | Caché ObjectScript Reference | Caché & Ensemble 2018.1.4 – 2018.1.9
to call these dynamically.

This also addresses the issue that xecute is highly risky from a security point of view, it can easily be targeted with injection attacks.

Hi Enrico, my sample code does that exactly. It takes number1 and converts it to a number than it compares the result to the original number1 field. 
Quirk of type conversion in ObjectScript if a value is converted from string to number ObjectScript walks the values from left to right and stops at the first non numeric character ie.
123ABC   becomes 123

The if clause checks then if 123 = 123ABC so the org value is non numeric.

Using && in the IF clause means do a logical AND check but short circuit the check ie. if condition 1 is already false go directly to the else clause and do not check cond2 and3

Hi, without knowing a bit more about what you are trying to achieve its difficult to advise.

To export and reinstate a data structure including content you would need to export the storage class definition.

After that you then can export the Global data and index storage defined by the storage class.
To export you can use $system.OBJ.Export from a terminal/iris session. Then reimport using $system.OBJ.Load

Hi Marykutty,

depending on your use case. Usually, I would suggest going with Primary and BACKUP mirror plus arbiter for the optimal HA resilience. A webgateway on a dedicated IIS can serve both your application and the SMP. I usually would though consider having 2 webservers running so your single webserver is not the single point of failure.
Also just to be aware webgateway is mirror aware and does not need a VIP to automatic redirect connections to the correct mirror. (refer documentation on mirroring )

very quick and dirty test, probably only works on small streams, also needs to actually read the whole stream for compare.

 

# test compare - streams are same
set stream1=##class(%Stream.TmpCharacter).%New()
set stream2=##class(%Stream.TmpCharacter).%New()
do stream1.WriteLine("ABC123")
do stream2.WriteLine("ABC123")
do stream1.Rewind()
do stream2.Rewind()
w (stream1.Read() = stream2.Read())

1

# test compare - stream are different
set stream1=##class(%Stream.TmpCharacter).%New()
set stream2=##class(%Stream.TmpCharacter).%New()
do stream1.WriteLine("ABC123")
do stream2.WriteLine("DEF456")
do stream1.Rewind()
do stream2.Rewind()
w (stream1.Read() = stream2.Read())

0

Completely silent install an application can only happen during IRIS upgrade/install or by being creative with scheduled tasks.

First step would be to automate installation of you application using a %Installer script refer to Documentation

Fully automating it could involve a scheduled task checking a folder on the filesystem for the installer manifest and importing it.

Hi Scott,

my first thought here was use ^GBLOCKCOPY.

GBLOCKCOPY can copy all globals from one database into a new database or namespace.

So in your case create a new namespace with the correct mappings and new default databases. then use ^GBLOCKCOPY to copy all globals into this namespace. The copy to namespace follows the mapping definition for the namespace and should split Global(data) and Routine(also in globals) into the respective default databases.
This new databases can also created mirrored and then would be populated on all nodes respectively.

A caveat though i would test this first as i am a bit unsure if it really gets all globals located in a database(including system), although i am pretty sure it does.

Hi,

so just to summarize what i understood. 

You have a superclass with some logging method. Now every time the logging method is called from a child class it logs the name of the superclass instead of the Child class?

If so the issue is that $CLASSNAME returns the name of the class where the method is located not where a method is called from.

To work around this behaviour you would need to rewrite your logging method to be a codegenerator, e.g.

instead of:

ClassMethod Log()
{
    w $CLASSNAME()
}

rewrite it like this:
 

ClassMethod Log() [ codemode = generator, forcegenerate ]
{
    do %code.WriteLine("    w $CLASSNAME()")
    quit 1
}

This will locate the Log method from the superclass to the child class and have $CLASSNAME resolve to the child classname.

Ther eis one inherent flaw i found when using linux service definitions. If you once stop/start IRIS using iris stop/start command it breaks the automated shutdown.

To work around this we usually define 2 service definition, one for normal control and one to ensure the instance goes down during shutdown.

example definitions:
 

    [Unit]

    Description=Shutdown management for ISC IRIS Instance SAMPLEINST - to ensure DB instance is properly shutdown on system reboot

    [Service]

    Type=oneshot

    RemainAfterExit=true

    ExecStart=/bin/true

    ExecStop=/usr/bin/iris  stop SAMPLEINST quietly

    [Install]

    WantedBy=multi-user.target

   

    # normal management

    [Unit]

    Description=Management for ISC IRIS Instance SAMPLEINST

    [Service]

    Type=oneshot

    RemainAfterExit=true

    ExecStart=/usr/bin/iris start SAMPLEINST quietly

    ExecReload=/usr/bin/iris   stop SAMPLEINST quietly restart

    ExecStop=/usr/bin/iris   stop SAMPLEINST quietly

    [Install]

    WantedBy=multi-user.target

    Alias=IRIS-iSAMPLEINST.service

Hi,

Try setting the Cookie security to LAX. This essentially has nothing to with the IRIS/Cache version but with the CORS standard implemented in modern browsers.

Cookies with SameSite attribute set to None are only allowed if they are secure. refer to https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls...

Hi Luis,

just looking at documentation try disabling: Do Not Use Delimited Identifiers by Default
 

snip from documentation (ref: documentation:

Do Not Use Delimited Identifiers by Default

The Do not use delimited identifiers by default option controls the format of identifiers in the generated routines.

Select this check box if you are using a database that does not support delimited SQL identifiers. This currently includes the following databases:

  • Sybase
  • Informix
  • MS SQL Server

Clear the check box if you are using any other database. All SQL identifiers will be delimited.