Question
Thomas Chericka · Oct 7, 2016

Calling $ZF(-1) and $ZF(-2) from within Cache Studio on Windows

Hi,

Thanks a million for taking the time to read this.

 

I'm calling the functions $ZF(-`1, <path to EXE>) and $ZF(-2, <path to EXE>) from Cache code. The exact code I'm using in Cache Studio is given below.

 

/// Test the functionality of ZF(-1) and $ZF(-2), 
Class %SourceControl.UnitTest Extends %Persistent
{

Parameter PATH As %String = "E:\VCS\CommandExecutor\bin\Debug\WindowsApplication.exe";

ClassMethod Test()
{
Do $ZF(-2, ##Class(%SourceControl.UnitTest).#PATH)
}

 

Now when I run the command in the Cache Terminal, as given below,

 

>do $ZF(-2, "E:\VCS\CommandExecutor\bin\Debug\WindowsApplication.exe")

 

the application works perfectly, and the required output is obtained. However, from Cache Studio, when I examine the output of the class given above, I get the error message:

 

Client/Server type mismatch.
Please contact InterSystems Support.

 

Does anybody have an idea as to what's going on, or how I can get rid of this error and make the Studio environment OS system call work properly?*

Thanks in advance.

*FYI I'm trying to enhance Studio with a new menu enhancement, Hence I need the code to work from within the Studio environment.

0
0 683
Discussion (6)2
Log in or sign up to continue

Configuration: Dell Inspiron 3542 Core i5 8 GB Cache 2016.1 and 2016.2 Windows 10 Anniversary Update

You wrote:

from Cache Studio, when I examine the output of the class given above, I get the error message:

...

Please tell us exactly how you are using the class from within Studio.

I just set the method ^Test as Debug Target and execute by clicking Debug Menu->Go (Ctrl + F5)... from within the Studio. I've made applications in Cache, but this behavior is new to me. Need a response...

I can't reproduce what you report.

Please confirm that in the "Debugging Target" dialog the upper radiobutton is set and the adjacent input field contains this:

##class( %SourceControl.UnitTest).Test()

And if you comment out the "D $ZF(..." line in the classmethod, then recompile it, does that resolve the problem. If not, then I think this proves that the problem isn't caused by the $ZF() call.

Also to say that if you need a response urgently you should contact InterSystems Support, a.k.a. WRC. This forum (Developer Community) is not a substitute for WRC.

First of all, thanks for your prompt response. Makes a lot of difference in situations like this.

W.R.T. the issue:

Yes, I tried commenting out the line. That resolves the problem instantly - no error message. This is definitely caused by the system call $ZF(-1) and $ZF(-2). This started happening when I tried to execute an executable I compiled with Visual Studio .NET Community Edition 2015. I did not use .NET binding - I simply placed the executable in a convenient location and made a $ZF(-2) call from within Cache Studio. For it's a GUI application - a call to $ZF(-1) makes it wait for the response indefinitely - hangs up the system. The executable was coded in C#.NET, with the use of a lambda. I understand that you will not be able to reproduce this issue. Can you send me an email ID in my email account registered with the forum? I'll send as much of the source code to you as I can. It's less than 300 lines - a minor fix.