#Caché

1 Follower · 4.5K Posts

  

InterSystems Caché is a multi-model DBMS and application server. See more details here.

Documentation.

Question Jimmy Christian · Apr 23, 2019

Hello all,

I am still learning CACHE and have below question.

In one of my ZEN method i am creating a table using

&sql(CREATE TABLE xxxxx(TNAMESPACE CHAR(100),TINTERFACE CHAR(100)))

Does any one knows how to concatenate a $USERNAME or any  content of a variable to the name of table ?

&sql(CREATE TABLE xxxxx_$USERNAME(TNAMESPACE CHAR(100),TINTERFACE CHAR(100))) is not WORKING.

Thanks,

Jimmy Christian.

2
0 287
Question Giray Ozel · Mar 25, 2019

I have two classes:

Class Example.Parent Extends %Persistent{Property Name As %String;Property Description As %String;

Property Children as list of Example.Child;

}
Class Example.Child Extends %Persistent{Property Name As %String;Property Description As %String;

}

 

A parent can have many children. I want to query for parents and add children for each parent to my result.

Here is the code that I query with:

7
0 1180
Article Sanjib Pandey · Apr 23, 2019 4m read

Method : to download the FTP file from intersystem cache : If you have any question please drop a message :

ClassMethod FTPDownload(myFTP = "", myUserName = "", myPassword = "", sFileLocation = "", dLocation = "", noOfdownloadFile = 1, sourceFileDel = 0)
{
 /*---------------------------------------------------------------------------------------------------------------------------
 download the file according to the requirements  : FTP

Method : Resuable 

by : Sanjib Raj Pandey on 30/03/2018

0
0 713
Question Roberto Cahanap · Apr 18, 2019

What is the process in importing a role from one server to another server?

Let's say Server A is our main server that we maintain all of our resources / roles / users. We would like to get these over to Server B, Server C, Server D, etc.

It looks like when we import, there are tables and resources left in the destination servers that are not in the source server. It looks like whatever was in the destination server that was not part of the source server was not deleted from the import.

What is the proper way of exporting/importing a role so that this does not happen?

2
0 191
Article Evgeny Shvarov · Apr 14, 2019 3m read

Hi guys!

Portrait of  Madame X, Gustave Caillebotte.

One of the features I like in InterSystems ObjectScript is how you can process array transformations in a specific method or a function.

Usually when we say "process an array" we assume a very straightforward algorithm which loops through an array and does something with its entries upon a certain rule.

The trick is how you transfer an array to work with into a function. 

One of the nice approaches on how to pass the information about an array is using $Name and Indirection operator. 

2
1 645
Article Stuart Byrne · Apr 3, 2019 5m read

Continuing on from my last post, I am posting my succesful output for the Day 2 Part 1 below.

A full explanation of Day 2 part 1 can be found at: https://adventofcode.com/2018/day/2 and the input can be found

at: https://adventofcode.com/2018/day/2/input

A brief description of this exercise is that you receive a sequence of strings.

You have to count the if any duplicate or triplicate chars exist in the string.  Multiples will exist, but if you find multiple ldupicates / triplicates you will count them once.

3
0 246
Article Eduard Lebedyuk · Feb 20, 2018 1m read

I needed to know programmatically if last ran failed or not.

After some exploring, here's the code:

ClassMethod isLastTestOk() As %Boolean{  set in = ##class(%UnitTest.Result.TestInstance).%OpenId(^UnitTest.Result)  for i=1:1:in.TestSuites.Count() {    #dim suite As %UnitTest.Result.TestSuite    set suite = in.TestSuites.GetAt(i)    return:suite.Status=0 $$$NO  }  quit $$$YES}
4
1 665
Question Neerav Verma · Apr 12, 2019

Hello All,

There are few tools for SQL optimization available and even query builder has Show Plan to give us an estimation of the resources needed to execute.

For Methods - Is there anything similar ??

I would like to see a similar approach as to the time taken for method to execute.

Is Studio Debugger only option ??

2
0 414
Question Thembelani Mlalazi · Apr 11, 2019

I have a query that I would like to  have refreshing at certain intervals lets say every 30 seconds with out refreshing the page content using the META TAGS

refreshes the whole page but I have a jquery function that will run at those intervals that I can use the problem is getting the jquery to call my COS function or is the way to do it with pure COS

2
0 490
Question Scott Roth · Apr 9, 2019

I have a wdsl soap request that now requires a header. Where do I modify the header to allow this new value to be sent?

   <soapenv:Header>
    <Headers xmlns="urn:epic-com.2013.Interconnect.Headers"> 
      <Epic-Client-ID>12349fe5-2ff8-4b79-b723-e69efbabcdef</Epic-Client-ID>
    </Headers>
   </soapenv:Header>

Thanks

Scott

7
1 756
Question Flávio Lúcio Naves Júnior · Apr 3, 2019

Hello everyone,

I'm trying to migrate the IDE for programming in COS, we normally use the Studio, but we want to use a more modern IDE. Our team has knowledge with Visual Studio plataform, but we couldn't configurate the compiler and terminal, I installed the extension InterSystems ObjectScript and tried to configurate to connect with my local machine, unfortunately the connection don't sucessed.

Someone has material for how i can connect and compile? Some material i saw show how to use the compiler, but not how can i do the configuration.

Best regards,
Flávio. 

6
0 1183
Question Thembelani Mlalazi · Apr 5, 2019

I am trying to get the time difference between two time stamps one is recorded earlier to the one happening current but the problem is sql expect string while I have the other stored in a variable and if I do the following I get errors any help please

&sql(SELECT {fn TIMESTAMPDIFF(SQL_TSI_HOUR,$ZDT($H,3,1,3),tx)})

 

please note that tx is a variable holding the time formatted the same way as the one being compared to

3
0 765
Question Robert Hanna · Apr 4, 2019

Hey everyone, 

I stumbled across a comment in this post that mentioned that the %SYS.GlobalQuery is a potentially faster alternative to %GSIZE. I tested it out and while I like the %SYS.GlobalQuery I noticed that it has some size discrepancies against a %GSIZE with details.  Can anyone tell me which is more accurate for estimating the size of globals?

Here is an example of one of the differences I saw. From this it looks like the size is estimated to about 70gb from %GSIZE and about 67gb from %SYS.GlobalQuery.

%GSIZE Output:

2
1 2661
Question Laura Cavanaugh · Apr 4, 2019

On one of our servers, when I am in Mgmt Portal and click the link for Configure / CSP Gateway Management, I get this url:

http://ipaddress.of.server:port/INSTANCENAME/csp/bin/Systems/Module.cxw?CSPSYS=0&CSPSYSreferer=_CSP.Portal.Home.zen

but the page displays a 0, and nothing else. Literally, just a 0.  This link works on our other servers, with the same URL.  Any idea why? 

Thanks,

Laura

4
0 356
Question Thomas Van Beveren · Mar 20, 2019

Hello everyone,

i am in process of changing our authentication method, so we can integrate our AD authentication in our programs. At the moment i am using they %SYS.LDAP object, and trying to use the .Bind() method with the user information to authenticate. This seems to work without issues, but here the problems start.

1
0 524
Question Lucas Fernandes · Mar 25, 2019

We recently registered unavailability of the Web service in some moments.The application goes offline.

Analyzing the IIS logs and logs in "C:\Windows\System32\LogFiles\HTTPERR" I found nothing relevant.

Analyzing the CSP Gateway logs I noticed the following behavior when unavailability occurs:

1
1 1771
Question Markus Neumann · Mar 31, 2019

Dear Colleagues and Friends,

is there any indication that the .NET object representation of Cache objects (i.e. InterSystems.Data.CacheClient.dll) complies with .NET Standard? I'm planning to extend our existing .NET client/server solution with a mobile option by Xamarin Forms and can't find any significant hints in the internet.

I'm just fooling around a bit and made some expreiments with a REST API and a generic object-to-JSON tier:

1
0 416
Question Thomas Viles · Apr 1, 2019

Hello all!

My company has been switching from $zf(-1) to $zf(-100) like many companies have been. I have been doing fine with 1 argument windows commands such as:

set errorfile = "D:\folder\error.txt"
set outputfile = "D:\folder\output.txt"


set options(1) = ""
set options(2) = "D:\ThomasTools\"

w $zf(-100,"/SHELL /STDERR="_errorfile_" /STDOUT="_outputfile, "dir", .options)

1
0 751
Article Константин Ерёмин · Sep 18, 2017 8m read

The InterSystems DBMS has a built-in technology for working with non-structured data called iKnow and a full-text search technology called iFind. We decided to take a dive into both and make something useful. As the result, we have DocSearch — a web application for searching in InterSystems documentation using iKnow and iFind.

18
0 1592
Question Craig Regester · Oct 16, 2017

Good afternoon - I am in the process of writing a AngularJS front-end for some CoS functions that my integration team uses for auditing, analyzing and various other purposes. I have re-tooled the functions to return JSON results that AngularJS can then interpret and display. Many kudos to the AngularJS series on this site for giving me a jump start.

6
0 856