Callout

Syndicate content 2 

Hello Community,

We have two live servers running DeepSee dashboards for users.  One of the servers can print a widget to a pdf file, and the other can't.  

I learned that 1) a Java JRE needed to be installed on the second server, and 2) it's trying to run an OS command to render a pdf file (details below).

An audit log of the event shows this:

Last answer 10 days ago Last comment 4 days ago
0   0 2
45

views

0

rating

I am having an intermittent issue that when I make a call to MSSQL from a BPL that the response does not come back in the amount of time required. Since the call from the BPL is synchronous I tried changing the timeout to 60 but it has not helped (see below). Is there anyway to guarantee that the call waits long enough for a response before continuing on?

 

Thanks

Last answer 20 March 2019 Last comment 21 March 2019
0   0 3
128

views

0

rating

I have a simple callout library:

#define ZF_DLL
#include 
#include 
#undef ERROR

int GetRandom(double* random) {
   // Py_Initialize();
   // Py_Finalize();
   *random = 1.0;
   return ZF_SUCCESS;
}

int main(int argc, char **argv)
{
   printf("Random: ");
   double random=0;
   GetRandom(&random);
   printf("%lf", random);
   return 0;
}

ZFBEGIN
    ZFENTRY("GetRandom","D",GetRandom)
ZFEND

I compile this code as a shared library and it works fine with:

Last answer 16 December 2018 Last comment 16 December 2018
0   0 2
152

views

0

rating

I am using java gateway imported/proxy classes and JG business service. I need to load a dll at run time.

I use System.loadLibrary/System.load when in java. I’ve tried $ZF(-3,” C:\Windows\System32\pteidlibj.dll”) and $ZF(-4,1,"C:\Windows\System32\pteidlibj.dll") but I’m getting <DYNAMIC LIBRARY LOAD> error.

How can I load a dll at run time using COS?

0   0 3
696

views

0

rating

There are numerous ways to interact with InterSystems Caché: We can start with ODBC/JDBC that are available via SQL gateway. There are API for .NET and Java too. But if we need to work with native binary libraries, such interaction is  possible through Caché Callout Gateway, which can be tricky. You can read more about the ways of facilitating the work with native libraries directly from Caché in the article below.

Last comment 29 March 2018
+ 5   1 1
599

views

+ 5

rating

I recently helped a site investigate a problem that appeared after they upgraded their Windows instance of Caché from 2015.1 to 2017.1. A terminal session launched from the server's desktop cube was unable to run OS-level commands using the $ZF(-1) function. For instance, using the no-op command "REM" as follows:

write $zf(-1,"rem")

was returning -1, indicating that the Windows command could not be issued.

Last comment 27 March 2018
+ 7   0 4
641

views

+ 7

rating

Some time ago I got a WRC case transferred where a customer asks for the availability of a raw DEFLATE compression/decompression function built-in Caché.

When we talk about DEFLATE we need to talk about Zlib as well, since Zlib is the de-facto standard free compression/decompression library developed in the mid-90s.

Zlib works on particular DEFLATE compression/decompression algorithm and the idea of encapsulation within a wrapper (gzip, zlib, etc.).
https://en.wikipedia.org/wiki/Zlib

Last comment 31 January 2018
+ 7   0 3
766

views

+ 7

rating

I use zf(-2) to spawn a external a Java application in a *nix instance.

I would like to kill this process after some conditions met.

I would like to leverage $zf("kill ... ") but this requires its the pid of this child process.

So is there a way to acquire the pid for the child process when I create it ?

If not, how is the suggested way to kill this process?

Thanks.

Last answer 9 January 2018
0   0 1
0

comments

185

views

0

rating

I could launch a external process via $zf(-2).

However, this child process need to refer some shared libraries in RUNTIME,so I have to set up the proper paths to the environment variable LD_LIBRARY_PATH, is anyone know how to do this?

Thank for your help.

Last answer 26 December 2017 Last comment 9 January 2018
0   0 1
189

views

0

rating

Is there a way to get one of:

  • Struct
  • $lb
  • Subscripted local variable
  • List/array

As a return type from callout call?

And related question: is there a way to return several values (which may contain commas) from one callout call.  Or rather what's the best approach when doing that?

Last answer 30 November 2017 Last comment 6 December 2017
0   0 2
199

views

0

rating

Hi I've created a word macro in order to convert doc to txt via the command line, this works fine via the command line by myself or another user but when I try as an the intersystems user which runs under  LocalSystem it doesn't work. 

So can I change the user, or set the $ZF to run as a different user?

Or do I have to try another way to convert doc to txt - it's looking like libreOffice?

I just wanted to stick with word because I could be guaranteed on the result being accurate.

Thanks

Regards

Richard

Last answer 25 April 2017 Last comment 7 November 2017
0   0 5
498

views

0

rating

Hi guys,

   I am trying to run a command line code using $zf(-1) in cache terminal. it is returning access denied error.

I have tried to run the code in cmd itself it is also throwing Access denied error. But if opened cmd as administrator and run the same code it is working perfectly. I am using windows system. 

Hence i need to know how can i run the cmd line code as administrator using our terminal or studio. Please help me out.

Thanks,

Mani

Last answer 3 November 2017 Last comment 3 November 2017
0   0 1
609

views

0

rating

Hello everybody,

We have a piece of Caché software which calls an external utility using $zf(-1,command). It works fine under Linux, but under Windows an external process occasionally hangs (due to some internal problems out of the scope here) and need to be killed programmatically. Having PID, it's easy to kill a process. If a Caché process is called with JOB command, the caller can easily get its PID from $zchild, but alas $zf(-1) does not seem to return the similar info. Is it possible to get it somehow?

Last answer 21 August 2017 Last comment 22 August 2017
0   0 1
349

views

0

rating

I have done Python - Cache binding setup following the guide from http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=.... I have also run test.py from sample3 folder and it able to run and complete successfully.

However, when I try to run the same test.py code via $zf, it gives error with exit code 1.

I've tried running help("intersys.pythonbind3") via $zf and also running from Cache terminal as follows:

Last answer 11 April 2017 Last comment 6 April 2017
0   0 0
341

views

0

rating

This is the second part of my long post about package managers in operating systems and language distributions. Now, hopefully, we have managed to convince you that convenient package manager and rich 3rd party code repository is one key factor in establishing of a vibrant and fast growing ecosystem. (Another possible reason for ecosystem success is the consistent language design, but it will be topic for another day.)
Last comment 6 February 2017
+ 6   0 0
994

views

+ 6

rating

Per the information at http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=... I am trying to use a call to $ZF("GETFILE") to obtain information about an OpenVMS file. But I get an <ILLEGAL VALUE> error.

For example:

w $zf("GETFILE",filename,"UIC")

reports:

<ILLEGAL VALUE>

My filename variable contains the full path and name of a file that I own. I hold the %All role in Cache.

Last answer 31 January 2017 Last comment 1 February 2017
0   0 2
221

views

0

rating

Hi,

Thanks for your time.

Plain $ZF(-1) and $ZF(-2) calls from Cache Studio or Terminal have stopped launching the OS shell from Win10.

cmd (Windows Command Prompt) should be launched.

Configuration:

Windows 10 Anniversary Update, Ensemble 2016.2.0.585.0 Developer Edition x64

Is this common? I have enabled both %Developer role and a Cache CallOut privilege for all users that operate in this scenario.

In Terminal, W $ZF(-1) prints -1, W $ZF(-2) prints -1

In Studio, W $ZF(-1) hangs the IDE, W $ZF(-2) prints 0

Last answer 8 December 2016 Last comment 8 December 2016
0   0 1
553

views

0

rating