Announcements

I have a simple app which tries to establish a connection with a Cache database instance via Global API for Java:

import com.intersys.globals.Connection;
import com.intersys.globals.ConnectionContext;

public class Assignment {

    public static void main(String[] args) {
        Connection connection = ConnectionContext.getConnection();
        connection.connect("SAMPLES", "_SYSTEM", "SYS");
    }

}

The expection I am getting:

Last answer 27 February 2018 Last comment 25 March 2018
0   0 4
475

views

0

rating

I am working with a client to try and export a set of tasks defined in the Task Manager from one system to another.  I am not seeing any API for this.  I can query this information in SQL.  So I tried to use the Data Export Wizard from the System Management portal in the SQL window.  Export was fine.  Importing failed with a "can't insert into read only field" error.  Looking at the class definition does not help since the implementation details are not visible.

So how would one accomplish this?  Export scheduled tasks from one system to another?

Last answer 2 June 2018 Last comment 4 June 2018
0   0 5
438

views

0

rating

Hi Guys,

 

Basically I'm looking for a sample what I can send data in aJSON format to a a webservice using an http request pls?

I've found some documentation on %Net.HttpRequest but a sample on how to connect to a Webservice and send data to it would be really helpful?

Our clients are running Cache & Ensemble 2014 

 

Thanks

Last answer 2 January 2018 Last comment 10 January 2018
0   0 3
3272

views

0

rating

I am trying to explore some new possibilities outside of the normal day to day HL7 interfacing we do. I have only done 1 other Web Service interface but it was using a SOAP proxy wizard. Now I am tasked with trying to make a call to an external API 

https://npiregistry.cms.hhs.gov/api/

Last answer 1 December 2018
+ 3   2 5
460

views

+ 3

rating

Hello, Community!

Here's an interesting task I found on the Internet.

Problem description

Write a method that would draw a box of a specified size.

The goal is to write the shortest method.

Here's a method signature (it can't be modified):

ClassMethod main(s As %Integer = 10)

And call sample:

>do ##class(ITPlanet.Task4).main(5)
#####
## ##
# # #
## ##
#####

>do ##class(ITPlanet.Task4).main(10)
##########
##      ##
# #    # #
#  #  #  #
#   ##   #
#   ##   #
#  #  #  #
# #    # #
##      ##
##########
 
>do ##class(ITPlanet.Task4).main(20)
####################
##                ##
# #              # #
#  #            #  #
#   #          #   #
#    #        #    #
#     #      #     #
#      #    #      #
#       #  #       #
#        ##        #
#        ##        #
#       #  #       #
#      #    #      #
#     #      #     #
#    #        #    #
#   #          #   #
#  #            #  #
# #              # #
##                ##
####################

Last answer 11 April 2018 Last comment 11 April 2018
+ 2   0 5
373

views

+ 2

rating

Hi all,

I'm wonder what could be the best way convert the sentence "Switch" C# into Cache code.

int caseSwitch = 1;

switch (caseSwitch)
{
    case 1:
    Console.WriteLine("Case 1");
    break;

    case 2:
    Console.WriteLine("Case 2");
    break;

    default:
    Console.WriteLine("Default case");
    break;

}

My first attempt was:

Last answer 3 July 2018 Last comment 20 July 2018
+ 1   1 7
1003

views

+ 1

rating

Hi,

The following sql statement is working through the SMP but couldn't make it work through the code.

The table is a linked table to oracle db.

Tried to change the date property in the linked table class from %Date to %String and also tried using %SQL.Statement and %Library.ResultSet

this work through SMP:

INSERT INTO PACKAGE.SOME_TABLE_NAME

(EFFECTIVE_START_DATE,MORE,DATA,HERE)

VALUES (to_date ('2018-04-01','yyyy-mm-dd'),123,456,789)

In the code i'm using '?' in the statement for the parameters.

Last answer 23 April 2018 Last comment 24 April 2018
0   0 2
190

views

0

rating

I wrote a ZAUTHENTICATE.mac a couple of months back, and found recently that it is creating coredumps on almost a nightly basis. I think I have figured out this problem to be not clearing out my MsgSearch after I am doing 2 of them within the code.

1. Get User Attibutes from AD

2. Get User Groups From AD

So while I am trying to cleanup the code I thought it would be a good time to add a Certificate and TLS to the mix since I should of been using that all along. However I keep running into issues

Last answer 30 June 2018 Last comment 24 July 2018
+ 1   0 3
234

views

+ 1

rating

This is probably a very naive question but :
Is it possible to create a Windows executable file from a Cache MUMPS (COS) routine, such that the routine can be run directly from Windows ?
If so, could some kind soul direct me to a source of information that describes the process.
I am using the free Intersystems Cache installation (CachePCkit V2017.1) on Windows 10 for my own use & personal development.

Thanks

Last answer 8 January 2018 Last comment 8 January 2018
0   0 3
673

views

0

rating

Hello!

I'm sending http resuest to the web service :

Set httpRequest=##class(%Net.HttpRequest).%New()
Set httpRequest.Server="177.127.120.10"
Set httpRequest.ContentType="text/xml" 
Set httpRequest.Https=1
Set httpRequest.ContentCharset="UTF-8"
Do httpRequest.SetHeader("Accept","text/xml")
Set httpRequest.Timeout=300     

Last answer 6 September 2018 Last comment 14 September 2018
0   0 1
393

views

0

rating

I have a class to track data changes.
As it becomes slower and slower to find last changes I think I need an index.
The 2 classes are just simplified reality.
HowTo ?

Class Rick.ChangeItem Extends %SerialObject
{
Property Subject As %String;

Property Author As %String;

Property Change As %TimeStamp;
}

and

Last answer 23 January 2018 Last comment 24 January 2018
0   0 3
543

views

0

rating

Is there a way in the routing rule to compare two fields in two different segments? For example, for the message below we need to compare one Identifier in PID-3 (uiytr5678906^^^^CKS)against another in MRG-1 (uiytr5678A06^^^^CKS). Both will always have the same IdentifierTypeCode (PID-3.5/MRG-1.5), but the ID number can be different. Just to clarify, we only want to compare the CKS IdentifierID, not the entire field or all the identifiers in the MRG-1 or PID-3 field.

Last answer 11 January 2018 Last comment 2 February 2018
0   0 3
513

views

0

rating

Hi, Community!

$CASE is a fine syntax sugar for "Ifs" with one-line/one-word expressions, like in docs:

SET daynum=$ZDATE($HOROLOG,10)
  WRITE $CASE(daynum,
              1:"Monday",2:"Tuesday",3:"Wednesday",
              4:"Thursday",5:"Friday",
              6:"Saturday",0:"Sunday",:"entry error")

But if my expression for a current case is a multi-line business logic? Can I use "{}" somehow or better go with "IF" instead?

Last answer 6 June 2018 Last comment 6 June 2018
0   1 4
355

views

0

rating

I was running the %File:FileSet class query, with my development user, but I am unable to run this query for an application user.  Does anyone know what resource or service is needed to run this query?  Assume the user has access to a certain directory on the file system needed for the query.

On second though, having tried almost all the available resources and services, perhaps the user doesn't have access to the directory.  How to tell when the error is this: 

Last answer 23 February 2018 Last comment 23 February 2018
0   0 3
262

views

0

rating

hi, new here, and new to cache and deepsee.

i've been trying to setup a copy of our production server so we can use it for testing/development.

i did a full  backup. moved it to the new server.  ran the DBREST command.  got it to restore but seems like permissions get all messed up. and it just generates a bunch of errors.

is there an easier/better way of doing this?

Last answer 8 March 2018 Last comment 9 March 2018
0   0 2
273

views

0

rating

Hi Guys,

I would to know, I have a drop down list items in my applications. While, am clicking on the drop down bx, there are few numbers of listed items, while am doing mouse over action, I should display the entire text of selected item from that drop down list box, even am not selecting that item. I would like to know about the what is exact text it contains in Zen framework. 

If any lead would be appreciated. 

Thank you in advance. 

Last answer 9 February 2018 Last comment 12 February 2018
0   0 2
705

views

0

rating

There are some classes in our code base that contain Methods only (no properties). I told my colleagues that converting them into the ClassMethods should improve performance as it would eliminate unnecessary OREF support at run-time. Some of them replied that it would be microseconds, so what is the reason to bother.

Is it possible to estimate the impact of OREF support of method calls at run-time? E.g., as a % of all CPU load. 

Last answer 1 October 2018 Last comment 2 October 2018
0   0 4
325

views

0

rating

I've mapped multiple tables (UNION on mapped SQL classes) into a view, using CREATE VIEW.

Through ODBC, in Entity Framework, I am querying against that view and offering paging. The paging is implemented using IQueryable.Skip and IQueryable.Take. 

Skip seems to have unexpected results, I believe due to incorrect SQL generated by the Entity Framework provider, though perhaps I've done something incorrectly. The generated SQL looks similar to this (with some bits replaced or altered for security reasons), the basic structure is unaltered.

Last comment 16 January 2019
0   0 2
356

views

0

rating

Is there a way to pull a user name and password from the Credentials list that is kept in Ensemble? Right now I have a LDAP user that I have hard coded into my ZAUTHENTICATE, which I would like to get away from. I am not to familiar with settings Global, or calling them at least.

Thanks

Scott

Last answer 24 February 2018 Last comment 1 March 2018
+ 1   0 5
663

views

+ 1

rating