Several $System.OBJ methods have ByRef errorlog argument:

Compile(ByRef classes As %String = "", qspec As %String = "", ByRef errorlog As %String, recurse As %Boolean = 0)

ImportDir(dir As %String = "", wildcards As %String, qspec As %String = "", ByRef errorlog As %String, recurse As %Boolean = 0, ByRef imported As %String, listonly As %Boolean, ByRef selectedlist As %String)

What's the best approach of working with errorlog?

Do you convert it to status? If so - how? Manual iteration over local?

Is there some system method to convert it into %Status?

0 1
0 334

Hi,

I have a service that I need to receive notifications from when the service has started. Usually this service will be off, but when started a need a method to be called so I can email and be alerted. The only method I know I can use is " OnProcessInput" but this is when an input is received (new file, new message...) but I could not find any events to deal when the service starts...I tried "OnInit" but does not seems to work...any ideas?

0 3
0 334

I have a registered object class that extends %XML.Adaptor and I want to convert an object of it into canonical XML.

From reading the documentation and some trial and error, it seems like I would need to use %XML.Writer to write the object to XML first using the RootObject() method, then read it with %XML.Reader, and then use the Canonicalize() method of %XML.Writer to write it out again.

Is there a better approach?

1 2
0 334

Is there a way or can it be done to use conditional logic in sql like so

 Query Q1(formal as %String) As %SQLQuery [ Final ]
{
    
    SELECT patientnumber,ID, CASE
    WHEN ID = 50 THEN "The is 50"
    WHEN ID = 30 THEN "This is 30"
    ELSE "The quantity is under 30"
END FROM Audit.Table WHERE ID = :formal AND EndDate is null} 

}

0 2
0 334

In the documenations at this location http://docs.intersystems.com/enscomm20152/csp/documatic/%25CSP.Documatic..., the normalize method applies normalizaion for text using the defined manguage and dictionary.

I want to normalize my iFind queries. How can I use the normalize method ? any code sample ?

I want also to delete properly the iFind index. Deleting all the rows in the table is sufficient ?

0 1
0 333

Greetings,

If given a global, how can I discover information on that global? More specifically, how can I discover how many indices it contains? ie: ^G(1,2,3,4,5) How can I discover that there are 5 subscripts within the Global ^G if I did not already know.

Please advise, and thanks in advance for everyone's time.

0 3
0 333
Question
· Aug 30, 2016
Get to know the format

I know that Cache files can be stored as XML and UDL based files. Is there any way to determine in which format the file(class, routine, dfi and so on) is stored? Because you can easily name your XML based file as class.cls and it will be perfectly valid.

I know that one way to check whether this file is in XML format is just try to parse it like

Set st = ##class(%XML.TextReader).ParseStream(contentStream)

if $$$ISERR(st) return $$$NO

else return $$$YES

However, is there a better way?

2 4
0 333
Question
· Sep 9, 2020
Build Python bind

I'm testing with an application I'm writing in python.
But I noticed that the pythonbind3 library will only work on the same machine where the cache is running. Is there really such a dependency?

I'm trying to run the examples that are in the / dev / python / samples3 folder, but they only work if I set "LD_LIBRARY_PATH" with the path to the cache installation folder.

But... I have this error when LD_LIBRARY_PATH is empty:

0 1
0 333

We have a custom FTP Service , and custom FTP adapter . Customization is just to find a duplicate file and for giving specific dynamic file spec pattern.
While running and polling for files, we are getting this error. Could you please help ? What's the issue and how to resolve it ?

ERROR <Ens>ErrFTPListFailed: FTP: Failed List for <FileName> (msg='Cache error in 'readResponse': <READ>zreadResponse+4^%Net.FtpSession.1',code=426)

0 1
0 333

I had a challenge recently where I was asked to parse and iterate JSON to find a patient that has a forename = "Bill" and try to make the function that iterates through the code re-usable.

Being working in Healthcare there isn't much experience or demand for parsing JSON, as most of my work is HL7.

I took this on using the documentation and worked out a way to parse the JSON (see posts below for code and source data).

0 6
0 333

HI,

I have made a query with class definitions and all their properties and put them in a view.

All is good besides Parameters is showing junk characters. Is there a way to do it cleanly besides getting into the code??

SELECT
CC.ID As CompiledClass,
CC.SqlSchemaName,
CC.SqlTableName,
CP.Name As PropertyName,
CP.SqlFieldName,
CP.Type,
PD.Parameters

FROM %Dictionary.CompiledProperty CP
JOIN %Dictionary.CompiledClass CC
ON CP.Parent = CC.ID

0 11
0 332

Hi community,

I have some constants hardcoded in my class as parameter values, and those constants are referenced in many places in my module. Now the need has arisen to provide different value for those parameters depending on some context. Is it possible to create some sort of accessor method for the parameter (like it is possible for properties), or do I need to perform a thorough refactoring?

Thanks.

Jiri

0 1
0 332
Question
· May 14, 2021
SSLConfig with ECC

Hello everyone,
I can choose between RSA and DSA. ECC seems to be unsupported.
Is there any workarounds without using external binary like curl?

Best regards
RY

0 5
0 332

How do I write DDL script for collection properties?

For example I want to create the following class:

Class SQLUser.Person {

Property Name As %String;

Property FavoriteColors As list Of %String;

}

My DDL script looks like this:

CREATE TABLE Person (Name varchar(50), FavoriteColors ???)
0 4
0 332

I am importing scriptlink wsdl in the form designer. I get the following error:

Error Importing WSDL. Please validate WSDL address. ERROR #6301: SAX XML Parser Error attribute value expected while processing Annonymous Stream at line 28 offset 73.

Please advise.

Thank you,

Chris Kennedy

0 5
0 332
Question
· Oct 14, 2017
ZenMethod in onunloadHandler

I want to call ZenMethod when page is closing. Is it possible?

I tried

ClientMethod onunloadHandler() [ Language = javascript ]
{
zenPage.SomeZenMethod();
}


Method SomeZenMethod() [ ZenMethod ]
{
// to do some work
}

0 1
0 332