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 337

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 337
Question
· Oct 17, 2016
Are we using callin API?

Hello community; this may seem odd, but I need to know if there's any way we could be using callin functions from a C application without knowing? e.g. if other developers created some C programs that call in to Caché that we don't realize are running. Is that possible? If so, where would I look to see these programs? Perhaps the server's task manager?

Thanks --Laura

0 2
0 337

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 336

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 336

Hi,

Is there a way to find the median in Intersystems Cache SQL? I know it is not available as an aggregate function. Also in SQL Server I could try something like:

SELECT
(
 (SELECT MAX(Score) FROM
   (SELECT TOP 50 PERCENT Score FROM Posts ORDER BY Score) AS BottomHalf)
 +
 (SELECT MIN(Score) FROM
   (SELECT TOP 50 PERCENT Score FROM Posts ORDER BY Score DESC) AS TopHalf)
) / 2 AS Median

However, there is no PERCENT Keyword in Cache as well. Any suggestions?

Thanks

0 4
0 335

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 335
Question
· Jan 16, 2018
Testing in studio

After creating a ClassMethod for a routing rule is it possible to test an HL7 message within Studio rather than using Management portal? It would make it easier to debug the custom function to see where the rule is failing.

0 2
0 335

I need to execute multiple DELETE statements in a single query like this

DELETE FROM TableName WHERE ID = 2;
DELETE FROM TableName WHERE ID = 3;
DELETE FROM TableName WHERE ID = 4;

However It does not work when there're more than 2 statements and gives me an error

Expected FROM found WHERE^DELETE FROM TableName WHERE

Using IN is not an option.

0 9
0 335
Question
· Nov 27, 2017
"Contains" operation for bitstring

aa=$zwc(411,1,1,3)/*$bit(1,3,5)*/
bb=$zwc(403,1,0,2)/*$bit(1,3)*/

Is there a handy function to test wether one bit string is covered by another one bitstring? For example, "bb" is covered by "aa".

I currently implement this by one AND operation and then do a bitcount, I just want to know any default function is already out there.

Thanks.

0 3
0 335

Hi,

I am trying to support a use case where a test instance is created from a production backup. At a high level, the process works by mounting all relevant file systems and then bringing the instance up. This works well as long as the file systems are mounted using same mount points as the source instance. However, I would like to support a case where file systems are mounted using different paths.

0 1
0 335
Question
· Sep 22, 2017
browse sql record

Hi , World

this is i field in my global:

{"profile_id":"9XOzzcI8NfSUjxAhEt0cTLRejwmp6HPi","biometrics":[{"timestamp":"2017-05-17T13:45:40","utc_offset":"+02:00","resting_heartrate":120.0,"spo2":98.0,"activity_id":"591c540aac8f295479ee14ce"}]}

for information: it's respective key is "peyload"

my question is :

I want to extract the timestamps value , and the profile_id value , how can i do?

thank's

0 4
0 335

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

[SOLVED]

added

>/tmp/compilew.log &>/tmp/compilew.log ; tail /tmp/compilew.log

to redirect the output to the stdout. Somehow the javac has wierd behavior with the output on errors and verbose information.

Hi,

i want the JAVA-Projections and wrappers to compile after Caché created the files. The creation of the files works 100%.

My addition to createProjection in our Projectionclass is following:

0 2
0 334

Edit:

May have found the issue but not the solution.

"SELECT * FROM wmhISTORYdETAIL" runs as a passthrough without asking for the DNS.

but

'SELECT Count([wmhISTORYdETAIL].[HistHMNumber] AS CountOfHistHMNumber FROM [wmhISTORYdETAIL] WHERE ((([wmhISTORYdETAIL].[HistMovType])='Receipt') AND (([wmhISTORYdETAIL].[HistMovDate])>=Date()-1) AND (([wmhISTORYdETAIL].[HistMovDate])<Date()));'

asks for the DNS but both are linked to a table that has the password saved.

Any Ideas please?

Rob

Hi

0 1
0 334

Hi

I am facing issue with cache database it is part of schneider PES software..the issue started with below:

and after some reinstallation i became not able even to install it.

receiving always message:

0 2
0 333