John Flippance · Jun 2, 2017
Decoding Base64 PDF File

Hello, I am writing some cache code that will pick up a PDF file, Base64 encode the contents and then send on to a third party system within a Long String (via their API). I have been testing this and discovered that the PDFs do not open within the supplier system (I get an error saying that it hasn't been decoded correctly). I wanted to prove that the issue does not lie with the way that I have Base64 encoded it within Ensemble, and therefore as a test wanted to Encode the PDF stream, then decode the stream and write out to a new file.

0 7 3,623

I have been using the query below and it was working fine but now it's giving a SQL error. There were no changes made that could cause this to stop working. There is no Field 'APPLICATIONID' in the table.

QueueSQL=select distinct (convert(char(5),SkillsetID)+'='+Skillset) from iagentbySkillsetStat where ApplicationID > 10000
QueueMappingSQL=SELECT DISTINCT (convert(char(5),SkillsetID)+'='+Skillset), SkillsetID FROM iagentbySkillsetStat iagentbySkillsetStat WHERE (iagentbySkillsetStat.ApplicationID>10000)

DB- Intersystems Cache

0 6 3,576

I have 2 instances of Cache, one of 2010 and the other 2016.  On both I have created a SSL Configuration with same name.

When I connect to a SOAP Service Client from Cache 2010, I get the above error.

If I connect from Cache 2016, the connection get through.

How can get more details of the error in the Cache 2010 instance to be able to fix this issue.

I have enabled the SOAP Log and it does not give much of details.



0 6 3,441
Arya S · Jan 5, 2018
UPS - SOAP WebServices Not Working

Hi all,

I have started using the UPS in my application for shipment and cancellation.

I have the WSDL from the UPS.

I have imported the WSDL via Studio->Tools->addins and finish the process to get the Package implemeted in my studio.

Now the SOAP method contains a URL which is for their live system so i manually changed the URL with their Testing URL.

They are also providing the sample shipment numbers which we can use to test the cancellation process.

I am trying that shipment number to void(cancel) the shipment by call the method.

0 3 3,394


Im curious if there is any specific configuration that has to be done on an IIS web server to serve up RESTful web services.

I have a server that has IIS installed, with the CSP gateway.  a second server that has Cache installed on it.

I have configured a web application using the Cache System Management Portal for the web services that has a dispatch class pointing to my dispatch class.

I have created an application mapping in my CSP Gateway Management Portal on the web server such that url's with /webservices prefix are routed to my cache server.

0 1 3,280

Hi all,

This might be a stupid question, but I'm going to ask it anyway. 

My goal is to write a scss file, pack it as part of a local library (Something like my_library.tgz), npm install that library into a different project and then import that scss file in one of the scss files in the new project.

Simply having the scss file exist in the library before I pack it didn't seem to work; the file wasn't under node modules after the npm install.  Am I doing something wrong, or are there extra steps I have to take?

Thanks in advance.

0 5 3,185

Hoping someone can help.

I need to convert a timestamp from the following format (YYYYMMDDhhmmss e.g. 20160105125915) to UTC time in the same format.

I presume I need to convert it to the system format ( like $HOROLOG ) and then use something like ConvertTimeStampToHorolog or perhaps LocalWithZTIMEZONEtoUTC but not sure of the syntax.




0 8 2,673
Ruslan K · Jul 23, 2017
Check if class exists

There is method:

$System.OBJ.New( ClassName As  %String = "" )

If class with name ClassName exists - everything is OK.

But, when class does not exist, there is error - <CLASS DOES NOT EXIST>

How can I check before calling $System.OBJ.New() if class witn name ClassName exists?

0 19 2,670

Currently, when we want to write data to a file that will be viewed in Excel, we parse the data in tab deliminated format to the file and name it with .xls at the end.  That is sent to end users via email.  They get a warning that the data is not formatted properly (it's not really an Excel file after all) but it does display somewhat correctly as the tabs are understood (this does not work if we deliminated with commas however).

3 28 2,607


Can anyone  point me to an example of a DTL & Class method that can pull a base64 encoded PDF out of a MDMT02 message?

This is really asking for two things;

- how to make a DTL that extracts a specific subfield of an HL7 2.3 message into a message of its own,


- how to transform an base64 encoded document into its original binary form for writing to a file.

I'd also love to see an example of an HL7 2.n MDM^T02 ==> HL73.ITK2 non-coded CDA

0 3 2,543
Set httprequest=##class(%Net.HttpRequest).%New()
	Set httprequest.Server=""
	Do httprequest.Get("/")
	Do httprequest.HttpResponse.OutputToDevice()
	Do httprequest.Get("/cache/")
	Do httprequest.HttpResponse.OutputToDevice()

The above is the code which i found in this link 

0 5 2,505

I'm aware of two ways to get list of files in a dir:

set dir = "C:\temp\"
set rs = ##class(%File).FileSetFunc(dir, , , 1)
do rs.%Display()


set dir = "C:\temp\"
set file=$ZSEARCH(dir_"*")
while file'="" {
   write !,file
   set file=$ZSEARCH("")

Yet they bot return only files and directories in a current directory, but not files in subdirectories.

I suppose I call one of these recursively, but maybe there's a better solution?

1 25 2,501

In .NET Core you have an option to extend a session using a "sliding expiration". This means that if over half the time has passed and the user actively uses their session then the expiry timer gets reset and the user remains logged in. This can lead to the curious situation where you have an active authenticated user with an expired access token being used in data-access requests.

0 1 2,395


My doubt is about the SQL Query in Caché:

I don't want to take all results from the table and orgainze them manually, for example: I have a table with 50 records, but I only want to select 10 records, being from tenth until the twentieth and this without knowing their IDs.

So, how can I do this, without losing performance, there is any way?

1 8 2,290

We have a new requirement being push down by our Data Security to no longer use Local SQL Accounts to access our Databases. So they asked me to create a Service Account that is on the Domain for our connections to each database.

I tried just changing my JDBC connection to using this Service Account and Password but I am not having any luck trying to connect to the database.

" Connection failed.
Login failed for user 'osumc\CPD.Intr.Service'. ClientConnectionId:ade97239-c1c8-4ed1-8230-d274edb2e731 "

0 4 2,131


I am trying to create a simple example of allowing binary (tiff) files to be selected and uploaded asynchronously to an IRIS for Health back-end.   I have managed to write the HTML and Javascript which works great with regular text / ascii files, but fails with binary files.

When I upload a binary file (tiff) image I get garbage like this on the database server 

0 5 2,006