I am reviewing some code where the % sign has been used liberally to name arrays that are worked on by different methods within the same class. Apparently it is not good practice to name variables with a "%" sign as the first character because this could overwrite other similarly named variables from other developers, including ISC! Is there another way to make a variable public ?

0 8
0 607

I'm getting this compilation error:

Kompilieren der Klasse digi.packet
FEHLER #5002: Caché-Fehler: <FUNCTION>zLockUse+5^%ExtentMgr.GlobalRegistry.1
> FEHLER #5030: Während der Kompilierung von Klasse 'digi.packet' ist ein Fehler aufgetreten

when importing one of my classes on the production server into one particular namespace:

0 8
0 640

In my routine when I call set filestream.FileName = filename, I get an error

"cn_iptcp://localhost:56773/USER/%Stream.FileBinary.1.INT" does not exist on the Server

I successfully instantiate the %Stream.FileCharacter object. 'filestream' value is '1@%Stream.FileCharacter'. But when I debug the code, the step where I try to set the file name fails.

The port number for local host looks good for my current instance. I have tried a few variations, such as using the method FileNameSet(). But this did not work either.

0 10
0 519

Is it just me or is the sync mechanism way too slow and too trigger happy to be used for large projects? It keeps "Caching for server connection" which takes a good five minutes!

Has it been tested with a large number of classes and CPSs? I have about 2000 of each.

0 2
0 475

I have a date in this format: "YYYY-MM-DD HH:MM:SS+HHMM" how can I convert it to UTC?

write $zdth("2018-02-01 00:00:00+0600",3,5)
>64680,0
write $zdt("64680,0",3,5)
>2018-02-01T00:00:00+03:00

As you see, timezone is lost. Docs for $zdth in timeopt (5) state: Specify time in the form "hh:mm:ss+/-hh:mm" (24-hour clock). The time is specified as local time. The following optional suffix may be supplied, but is ignored: a plus (+) or minus (–) suffix followed by the offset of local time from Coordinated Universal Time (UTC)

0 2
0 1.9K

SetIdentityInsert call controls the ability of the user to specify a value for the IDENTITY property when saving a new object, a value for the IDENTITY column or an explicit ROWID value in an SQL INSERT. If IDENTITY_INSERT is false and the user specifies an explicit IDENTITY or ROWID value when saving a new object or inserting a new ROW then an error condition is reported.

Setting takes effect immediately and lasts for the duration of the process or until SetIdentityInsert is called again.

My question is how can I change this setting system-wide?

0 2
0 282

I am new to Intersystems Cache, so please bear with me. We are using HealthShare 2013.1.

I have a routine to compare databases from separate instances where I want to ignore values that begin with %sqlcq. I thought this would be easy with pattern matching operator '?' but it is proving difficult and it seems to be because of the percent character.

For example:

0 4
0 415

I am currently working with someone who is in the process of moving an application written in Cache Object Script over to a Windows server. It was previously running on a Linux server so all of the paths are unix style paths. Is anyone aware of a way to have cache remap paths to different paths so this user won't have to go through all of the scripts and change them?

0 2
0 1.8K

Hi Community,

I have a need to access the Lock Table to find the Process ID of the process that has a particular global node Locked. The process holding the lock could be on any one of four application servers.

Having identified the Process ID, I then need to interrogate the local variables for that process, to find an application User ID.

I can then inform the current user which of their colleagues has a particular record locked, preventing them from continuing with their work...

Are these things I can do under Caché? If so, how would I do so?

0 6
0 609
Question
· Dec 3, 2018
Rest return 500 error

I have an application which is distributed across maybe 5 servers since it has over a thousand users at a time we had an upgrade to the application last week and I had an integration build that uses the REST service ( ##class(%Net.HttpResponse) but since the upgrade the integration has not be able to communicate with the application tried testing my URL through Postman and all seems ok but if I test direct I get a 500 error anything that I need to check on please or any advice on how to check what's going on.

0 2
0 434

Hi guys!

Suppose you developed a tool, framework, library on InterSystems ObjectScript for InterSystems Data Platform, share it via Open Exchange and want people to install it.

What is the best strategy if it is a library and supposed to be called from different namespaces?

Here are the following thoughts:

1. Tool's developer should be able to use globals to read/store data the tool needs.

2. Tool's consumer should be confident, that the thing he/she installs will not harm the application's data.

3. A tool should be callable from any application's namespace.

4. Tool's installation(in general) should not request manual security changes (e.g. grant the write access to IRISLIB) and %YourClass is not an option.

5. It's easy to uninstall the tool - just delete the namespace/database (maybe delete some web-apps too).

0 10
0 410

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

Hi community.

I'm trying to create a "setup" method to be called on a batch script but i'm getting the error <INVALID ARGUMENT> when I pass a string as an argument to this method.

The idea is to call the method with a folder as the parameter, for example:

##class(test.MyClass).MyMethod("D:\path\to\my\file.json")

My class (just for example)

Class test.MyClass

0 7
0 1K

I've been wondering about some code that I have come across a lot over the years.

Let's assume I have class Cinema and class Film.
Conceptually the data in these classes are never really physically deleted but only flagged as such, due to business requirements.

What I find is that developers tend to create a 3rd class "CinemaFilms", in a child relationship to parent Cinema, with a reference to Film. Rather than a one-to-many between Cinema and Film.

0 5
1 1.1K

Suppose we need to store millions of values temporarily, that means, we don't care about them if we lose them but our application use them to get realtime information. Should I use Cachetemp or whatever other DB without journaling enabled? If answer is Cachetemp, shouldn't be a problem if we decide to scale using App Server + ECP? I'm not sure what would happen with the app logic in such architecture as I guess I couldn't map and share cachetemp...

Any idea/suggestion?

0 5
0 850

We have a Cache database in Azure, and want to expose it as an OData source (link).

My first attempt was to use Microsoft's Visual Studio 2017 and Entity Framework to create the data models...but it seems as if EF and Cache don't work together. (I do have those instructions from 2013, but they don't work. (See other post. Best answer seems to be "migrate to IRIS 2019.1.")

Is there any other form of OData support?

0 1
0 625

Hi community,

I would like to ask how to correctly enforce SSL on all "developer traffic" -- that is Management portal and Studio connections -- on a Caché instance.

Given large developer permissions, I would like to eliminate all plaintext credentials on the wire.

Currently, we compile our own httpd with SSL support for Management portal, but this breaks Add-Ins for us, in particular the SOAP wizard. So I guess this is not the "canonical way".

Thanks for any suggestions

Jiri

0 12
0 624

Our development server is set up to automatically keep the .INT code of compiled classes and routines, but the live servers are set to not keep the .INT code.

I know how to set the system to keep this code ($SYSTEM.OBJ.SetQualifiers() ?) but what are the ramifications of keeping this code on the live servers? Is it just a space issue? I always thought it was to keep the code more private.

0 4
0 526