If you want it stored, make it triggered computed like this:

Property LabCode As %Library.String(MAXLEN = 64) [
  SqlColumnNumber = 5,
  SqlComputeCode = { set {*}= $EXTRACT({LabName},0,3)_" "_{LabID}},
  SqlComputed,
  SqlComputeOnChange = LabName ];

Docs.

Note that it wouldn't recalc LabCode values for existing rows. If you need that, trigger recalculation with trivial update.

Use {%%ID}.

Here's an example:

Class util.Calc Extends %Persistent
{
Property calc As %String [ Calculated, SqlComputeCode = {set {*} = {%%ID}}, SqlComputed ];

/// do ##class(util.Calc).Test()
ClassMethod Test()
{
    set obj = ..%New()
    set sc = obj.%Save()
    do ..AllFunc().%Display()
}

Query All() As %SQLQuery
{
SELECT *
FROM util.Calc
}
}

Calling:

do ##class(util.Calc).Test()

Returns:

ID      calc
1       1

Docs.

There are many ways to do what you need.

  • Copy CACHE.DAT / IRIS.DAT
  • Export globals and code
  • Use ASYNC mirror or backup

Here's the questions you need to answer to choose the best path:

  • Is downtime OK or not?
  • Do you need a whole database or some part?
  • What's the size of your DB?
  • Are there mirrors/backups available?
  • Are your code/data in separate DBs?
  • Do you need to run the pipeline once or do you need to stay somewhat up to date?

You'll need a SQL procedure to return status. I haven't found it already SQL enabled.

ClassMethod ItemStatuses(pName, pIsRunning, pEnabled, pID) As %String [ CodeMode = expression, SqlProc ]
{
##class(EnsPortal.Utils).ItemStatuses(pName, pIsRunning, pEnabled, pID)
}

After that just query Ens_Config.Item:

SELECT
  ID,
  ClassName,
  Name,
  Enabled,
  ItemStatuses(Name, 1, Enabled, Id) Status
FROM Ens_Config.Item

Parameter pIsRunning means a running production.

Procedure returns comma-separated info about host status and io status.

Do you use an alternative or framework built around this native Unit Testing tool ?

Not really.

What is your experience with %UnitTest if you use it ?

Except lack of test parallelization it's actually quite good. Also would be great to be able to skip some tests natively.

Is there a tool you would recommend for your UI (I know this is not specifically an InterSystems' related question)

@Sergey.Sarkisyan any comments?

What process do you use to routinely run tests on your application ? 

You can read about that in my series of articles on GitLab.

$ZUTIL(69,10) - Sets system behavior when journal is full.

Calls:

  • $ZU(69,10,n) - set journaling behavior
  • $ZU(69,10) - get journaling behavior

Parameters:

  • n - The boolean value that specifies which system behavior applies when a journal is full. Values:
    • 0 = Journaling suspends and processing continues.
    • 1 = System freezes.

Description
$ZUTIL(69,10) determines Caché behavior when an error occurs in writing to the journal.

  • If this option is set to “true” (1), as soon as the error occurs all global activities that are normally journaled are blocked, which causes other jobs to block. The typical outcome is that Caché goes into a hang state until the journaling problem is resolved, and then resumes running. While Caché is hanging, the administrator can take corrective measures, such as freeing up space on a disk that is full, switching the journal to a new disk, etc. This option has the advantage that once the problem is fixed and Caché resumes running, no journal information has been lost. It has the disadvantage that the system is less available while the problem is being solved.
  • If this option is set to “false” (0), when a journaling error occurs journaling is entirely disabled, while Caché continues running as normal. Caché sends a console message to alert the administrator, who can fix the problem and then run ^JRNSWTCH at the console to restart journaling.

The default is zero (0). The native default for this switch is “false” (0); that is, to suspend journaling and allow Caché processing to continue. Invoking $ZUTIL(69,10) without specifying n returns the current switch setting.

This system-wide default can be configured. Go to the System Management Portal, select [Home] > [Configuration] >[Journal Settings]. View and edit the current setting of Freeze on error. The default is “No”.  Setting $ZUTIL(69,10) changes the system configuration setting shown in the System Management Portal; this changepersists across a Caché shutdown and restart.
 


$ZUTIL(69,68) - Enables or disables the encryption of journal files system-wide.

Calls:

  • $ZU(69,68,n) - set encryption
  • $ZU(69,68) - get encryption

Parameters:

  • n: The boolean value that specifies whether or not Caché should establish encryption for future journal files. Values:
    • 1 = encrypt journal files.
    • 0 = do not encrypt journal files. The default is 0.

Description
The $ZUTIL(69,68) function disables or enables the encryption of journal files system-wide. $ZUTIL(69,68) takes effect when the next journal file is initiated.
Invoking
$ZUTIL(69,68) without specifying n returns the current switch setting

 
$ZUTIL(69,70) - Enables or disables $DOUBLE returning INF and NAN values system-wide.

Calls:

  • $ZU(69,70) - get $DOUBLE behaviour
  • $ZU(69,70,n)- set $DOUBLE behaviour  

Parameters

  • n - A boolean that specifies whether to generate Caché error messages or return INF, –INF, and NAN values for unresolvable IEEE floating point conversions. Values:
    • 0 - $DOUBLE returns INF, –INF, or NAN when given an unresolvable numeric expression.
    • 1 - $DOUBLE generates Caché <MAXNUMBER>, <ILLEGAL VALUE>, and <DIVIDE> errors when given an unresolvable numeric expression. This is the default.

Description
The $ZUTIL(69,70) function sets the $DOUBLE function return value behavior system-wide. If 0, $DOUBLE returns INF (infinity), –INF, and NAN (Not A Number) for unresolvable IEEE floating point conversions. If 1, $DOUBLE generates Caché errors for unresolvable IEEE floating point conversions.
$ZUTIL(69,70) controls the issuing of INF, –INF, and NAN when a $DOUBLE numeric operation cannot be resolved to a numeric value. It does not control the issuing of INF, –INF, and NAN in all cases. $DOUBLE always returns INF, –INF, or NAN when you supply one of these strings as the input value, regardless of the $ZUTIL(69,70) setting.
Mathematical operations on
$DOUBLE numbers that result in an INF, –INF, or NAN are controlled by $ZUTIL(69,70).
These include arithmetic operations, exponentiation, and logarithmic and trigonometric functions.
Invoking
$ZUTIL(69,70) without specifying n returns the current switch setting.

add SOAP envelope

Not sure what are you trying to do. SOAP Operation should add all relevant headers and additional ones can be passed as objects. Docs.

UPD.

  • I meant java code for com.santer.siss.mapping.v25.fse.tester.HL7toXML:hl7ToRP method.
  • For $$$CLASSNAME you can click RMB on it and then LMB on "Go To $$$CLASSNAME", in there you can see a macro definition(#define CLASSNAME <definition>). Please post it.  

The quite strange thing is that when I try to log the class type I have obtained as output of the java class, I didn't get %String or some other
ObjectScript class but, instead, I get the xml message itself. It seem to be that the result don't have a proper class type.

That is correct, the ret variable seems to be a string, so it's not a class, therefore it cannot have a class name.

In Object Script there are objects and primitives (strings). Only objects have classes.

The final issue arise when I try to put the result into a stream; the xml message results empty and, moreover, If I try to send just the RPStream, I get this error: OID is null. 

How are you doing it?