Article Gevorg Arutiunian · Jan 24, 2019 2m read

The class method "test" in the following code snippet sends an HTML email with an embedded image. Edit the literal strings to change the embedded image, to address, from address, subject, and body of the email.


Class objectscript.sendEmailWithImage Extends %RegisteredObject
{
	classmethod test() {
		S SmtpServer = ""
		S SmtpUserName = ""
		S SmtpPassword = ""
  
		S imgPath="C:\test.jpg"
		 
		set s=##class(%Net.SMTP).%New()
		set s.smtpserver=SmtpServer
		set auth=##class(%Net.Authenticator).%New() ; use default authentication list
		set auth.UserName=SmtpUserName
		set auth.Password=SmtpPa
0
1 872
Question Dhaval Shah · Jan 24, 2019

Hi All,

Actually I am trying to implement a RESt API where in I will get ZIPCODE as request and I need to call external API which will take ZIPCODE as input and give State and City in response.

But the problem is the request is in XML Format and also response is in XML format.

Example :

https://XYZ.com/ABC.dll?API=CSLookUP&XML=<CSLookupRequest USERID="USERID">
<ZipCode ID='0'>
<Zip5>20024</Zip5>
</ZipCode>
</CityStateLookupRequest>

and in Response 

<?xml version="1.0" encoding="UTF-8"?>
<CSLookupResponse>
    <ZipCode ID="0">
        <Zip5>20024</Zip5>
        <City>WASHINGTON</City>
        <Sta

2
0 791
Question Eliot Eric · Jan 23, 2019

 hi, everybody!

i wanna connect to a remote server  through Terminal.  

after i add a server in [Preferred Server] and click the  server name(  [Remote System Access]->[Terminal] -> server name) 

i got an Error dialog telling me that:

Failed to establish security context.

Reason:(-2146893042, 0x8009030e)No credentials are available in the security package

so do i miss some configuration?  

Grateful for your help!

10
0 1740
Question Oliver Wilms · Jan 23, 2019

Hello, we have a couple of BPL processes. This works with a limited amount of messages but we run into issues when we process thousands of messages in a session. One BPL calls a Validation BPL process with async='False' and there is a response defined. The timeout is two seconds and that seems to be plenty of time for the validation process. I expected the calling process to wait for a response but that is not happening. The documentation says: A <call> element with async='False' and a <response> block defined suspends execution of its business process thread until the called operation complet

1
0 367
Question Jim Winski · Jan 23, 2019

In Ensemble, when I go to access a file, a File Selection Dialog window opens. Although subdirectories are listed in alpha order, the files are in no particular order (that I can tell). They are not in alpha, size, type, last modified, etc. See image below for an example.

Anyone know if there actually IS a sort order for files in the File Selection Dialog? If so, can it be changed? We have Ensemble running on multiple servers and I could have identical file paths with identical files in those directories and they can show up differently. That makes me think that there may be something that cont

1
0 384
Article Benjamin De Boe · Jan 22, 2019 1m read

Running predictive models natively in an InterSystems IRIS Business Process has of course always been the goal of our PMML support, but somehow never made it into the kit because there were a few dependencies and choices that needed addressing and answering. Anyhow, thanks to some pushing and code kindly provided by @Amir Samary (Thanks again Amir!), we finally got it wrapped in a GitHub repo for your enjoyment, review and suggestions.

2
3 566
InterSystems Official Jeff Fried · Jan 21, 2019

The preview release of InterSystems IRIS for Health 2019.1 is now available - try it out!

Kits and container images are available via WRC's preview download site.

InterSystems IRIS for Health 2019.1 is the second major version of InterSystems IRIS for Health.  It has many new capabilities including:

  • Significant enhancements to SQL usability and performance
  • Improved scalability and operations for sharded clusters
  • Client language updates and performance boosts
  • New interoperability capabilities that speed configuring and troubleshooting of productions
  • Updates to FHIR support and message transformations.
2
0 467
InterSystems Official Jeff Fried · Jan 21, 2019

The preview release of InterSystems IRIS 2019.1 is now available - give it a try!

Kits and container images are available via WRC's preview download site.

InterSystems IRIS Data Platform 2019.1 is the third major version of InterSystems IRIS.  It has many new capabilities including:

  • Significant enhancements to SQL usability and performance
  • Improved scalability and operations for sharded clusters
  • Client language updates and performance boosts
  • New interoperability capabilities that speed configuring and troubleshooting of productions
  • System security, performance, and efficiency enhancements

These are de

8
1 1076
Question Guillaume Rongier · Jan 21, 2019

Hi, I'm looking for a way to implement the JDBC pattern "executeBatch" in ObjectScript: https://www.tutorialspoint.com/jdbc/jdbc-batch-processing.htm

Since Ensemble 2017.2.2 there is a new method called executeParametersBatch : https://docs.intersystems.com/ens20172/csp/docbook/relnotes/index.html#…

Even in the Ensemble 2018.1 change log, mention a patch on this method: https://docs.intersystems.com/ens20181/csp/docbook/relnotes/index.html#…

Do you have any examples or tracks to use the executeParametersBatch method of %Net.Remote.Java.JDBCGateway?
Otherwise have you fou

4
0 866
Question Rand St. James · Jan 21, 2019

Hello;

I have created an App launch to my FHIR app in the sandbox and am able to access Patients that are provided in the Sandbox. Having done this, I would now like to upload a  test patient in a FHIR bundle to the sandbox, however I have not been able to find out how I can do this.

Can you provide some direction/tools that I can use to upload my bundle to the sandbox?

Thanks

-Rand

4
0 898
Question Mogamad Allie Saal · Jan 17, 2019

Hi.

We have created an Ensemble production that receives HL7 information via TCP Adapters, but the requirement from the vendor is that we submit an ACK message with the MSH segment mist have a date and time populated with seconds.

We are utilising the standard class for the Service Adapter (EnsLib.HL7.Service.TCPService).

HL7 Version 2.5 no modifications currently.

The messages received via the service is correctly received in ddMMyyyyhhmmss but our ACK back is only ddMMyyyyhhmm.

Due to the ACK not having the ss the message is rejected by the vendor.

Ps: Our interface is using ACK Mode -

1
0 1479
Question Thembelani Mlalazi · Jan 22, 2019

I need to select my result into a list and be able to loop through the list when query finished any help appreciated here is where I am

##sql(SELECT %ID INTO :IDArray() FROM MergeHyland.TypeTwoDimesionCollection WHERE GUID = :Key AND EndDate IS NULL)
for I=1;1:$LISTLENGTH(IDArray)

{

w $Data(IDArray),i

 


}

2
0 1641
Question Kevin Furze · Jan 16, 2019

I need to automate the handling of usernames passwords, serverNames etc for use in the sending and receiving  of emails, logging into SFTP servers etc etc for use within COS code
To manage external passwords we could use LastPass or any other proprietary password loggers, but I need to be able to call them as part of the automation (COS code) and occasionally visually look them up to "remind" the staff of their passwords.

any suggestions as to the best class data constructs to handle this scenario. Should the whole table be encrypted, only the passwords etc.

each employee has their own login deta

9
0 620
Question Thembelani Mlalazi · Jan 22, 2019

I have this query That I am trying  to use in my class when testing on the terminal I expect to get the results printed on the terminal but I am only getting zero printed please can anyone out there advice on what I am doing wrong

Method PatientInfo(ID As %String) As %Status
{ #dim status as %Status=$$$OK
  SET myquery="SELECT GUID, IDType,IDValue FROM MergeHyland.TypeTwoDimesionCollection WHERE GUID ="_ID
  SET rset=##class(%ResultSet.SQL).%Prepare(myquery,.err,"")
    WHILE rset.%Next() {
    WRITE !,rset.GUID & ":" & rset.IDType& ":" & rset.IDValue
    }
  WRITE "End of data"
    r
1
0 475
Question Fabian Pie · Jan 19, 2019

Hi,

I'm using node.js to access to Iris.

Considering this globals:

^Customer(1, "Address", 1)="London"

^Customer(1, "Address", 2)="UK"

^Customer(1, "Name")="Jane K. White"

^Customer(2, "Address", 1)="Reigate"

^Customer(2, "Address", 2)="UK"

^Customer(2, "Name")="Peter R. Black"

^Customer(3, "Address", 1)="London"

^Customer(3, "Address", 2)="UK"

^Customer(3, "Name")="Paul J. Green"

I retrieve all customers with: 

mydata.retrieve( { global: "Customer" },

"array",

function(error, result) {

if (error) {

// error (see result.ErrorMessage and result.ErrorCode)

} else {

// success

} } );

How could I retrieve just the cus

12
2 433
Article Dmitrii Kuznetsov · Jan 21, 2019 10m read

Headache-free stored objects: a simple example of working with InterSystems Caché objects in ObjectScript and Python

Neuschwanstein Castle

Tabular data storages based on what is formally known as the relational data model will be celebrating their 50th anniversary in June 2020. Here is an official document – that very famous article.  Many thanks for it to Doctor Edgar Frank Codd. By the way, the relational data model is on the list of the most important global innovations of the past 100 years published by Forbes.

On the other hand, oddly enough, Codd viewed relational databases and SQL as a distorted implementation of his theory.  For general guidance, he created 12 rules that any relational database management system must comply with (there are actually 13 rules). Honestly speaking, there is zero DBMS's on the market that observes at least Rule 0. Therefore, no one can call their DBMS 100% relational :) If you know any exceptions, please let me know.

0
3 950
Question Eduard Lebedyuk · Sep 5, 2017

Let's say I have this property:

Property FavoriteColors As List Of %String;

I heed to convert it to JSON using SQL or at least without object access (so direct global access).

What's the fastest way to do that?

I thought about JSON_ARRAY and JSON_ARRAYAGG sql functions but they don't do that.

5
0 1395
Announcement Evgeny Shvarov · Jan 18, 2019

Hi Community!

Here is the digest of what has happened on Open Exchange in November and December 2018!

Application Releases

We had 5 releases in November and December:

Cache ODBC for Node.js

This library aims to provide simple access to ODBC data sources for node.js.

Laracache

Laravel package providing InterSystems Cache as a data source using ODBC

DeepSeeButtons

Tool for analyzing your DeepSee Environment

DSW Reports

Addon for DeepSee Web which provides online reports and PDF emailing reports using InterSystems DeepSee dashboards

AnalyseThis

Utility to easily transform a CSV file into a personalized preview of DeepSee

0
0 245
Question Eduard Lebedyuk · Dec 27, 2018

I have an in-memory list of items and I want to check which items match my pattern string.

Pattern string is a comma-separated list of items and special symbols like '*' and maybe '?'.

There's something similar in $system.OBJ.Compile, it accepts patterns: "*.data.*,Sample.*" -  and it would compile 'Sample' package and all 'data' packages.

For example:

set list=$lb("abc", "c", "aaa", "bbb")
set result = ..match(list, "a*,*b")
zw result
result=$lb("abc","aaa","bbb")
7
0 903
Question Adrian Zeeman · Jan 17, 2019

Hi there,

I've been busy setting up Perforce source control on a Cache 2017.2.2.865.0 instance. Everything is mostly done and working through studio hooks. Checking out, modifying and checking back in works correctly but I would like to know what the hook, override, setting is to force studio to check if the class needs to be checked out or is already checked out by another user before you are allowed to edit it.

3
1 849
Question Eduard Lebedyuk · Apr 3, 2017

I need to convert timestamp into HTTP-date as defined in section 3.3.1 of [RFC2068]HTTP-Date can have several representations, but preferable view is defined by RFC 822, updated by RFC 1123 and looks like this:

wkday "," SP date1 SP time SP "GMT"

Here's an example of HTTP-date value:

Sun, 06 Nov 1994 08:49:37 GMT

The problem I encountered, is that if server locale is not English, then $zd, $zdt and TO_CHAR return localized names of weekday and month (i.e: Вос). Is there a way to get English names of weekday and month regardless of server locale?

Just checked TO_CHAR and

3
0 620
Announcement Anastasia Dyubaylo · Dec 6, 2018

Hey Developers!

Good news! Just in time for the holidays, Gartner Peer Insights is offering customers a $25 digital Visa Gift Card for an approved review of  InterSystems IRIS or Caché this month!

We decided to support and double the  stakes. So! In December '18 you can get the second $25 digital Visa Gift Card for Gartner review on Caché or InterSystems IRIS on InterSystems Global Masters Advocacy Hub!

See the rules below.

5
0 1492
Question Eduard Lebedyuk · Jan 17, 2019

I have a persistent class.

I want to store one of the properties there as a stream or a string depending on a size.

99% of values would be strings (less than $$$MaxStringLength characters) so I don't want to store everything as streams.

What do you think of this approach?

What's the best architecture to implement in this situation?

4
0 738
Announcement John Murray · Jan 14, 2019

At the George James Software booth at Global Summit last year we took the wraps off the work we've been doing to make our popular editing and debugging tool Serenji available on the Visual Studio Code platform.

Rather than requiring you to pull code from your namespaces into local files, then push the changes back to the namespace to run it, you work directly in the namespace. In other words, the editing experience is like Studio rather than like Atelier.

As well as editing code you can also debug it directly from VSCode.

We're now looking for people to test a pre-release. If you already us

12
1 907
Question Anthony Harrison · Jan 14, 2019

Hi,

We are using Cache to generate HTML pages (complete with Javascript), which we are reading in an Android phone App's WebView.

If, when we generate HTML as follows:

<html>

<body bgcolor='red'>

Hello World

</body>

</html>

Reading this is iPad gets what you would expect, a red page with Hello World written in it.

However in Android phone, the page is both white and blank.

What stumps us is that for Android, if we intercept the call in the csp page that generates the html, and we redirect the call to another (cache) page's url (ie another csp page), the whole of the content of the new Url is displayed i

16
0 393
Question JAQUELINE KRIEGER · Sep 3, 2018

 Hi Community,

  I am using a method taht calls a Dashboard in Deepsee web  from an application , but I want to know if it's possible  to not showing the header, this part that have the search button, the name of the namespace, etc..

This is the method : 

Method %OnAfterCreatePage() As %Status
{
    //Set contratistaId = $Get(%session.Data("ContratistaId"),"")
    //Set gerenciaId    = $Get(%session.Data("GerenciaId"),"")

    //Set filter1 = "&SETTINGS=FILTER:Gerencia.Gerencia.idGerencia."
    
    //Set urlBase = "_DeepSee.UserPortal.DashboardViewer.zen?DASHBOARD=Operacion%2FOportunidad%2FVistaOportun


10
0 694
Question Chris Sprague · Jan 23, 2018

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.

SELECT TOP (2) * -- "2" is the number of records per
11
0 774