John Murray · Mar 26, 2018 go to post

Specifically, the $-style methods (called system methods) were introduced in 2016.1 and then removed in 2016.2. See here for details.

John Murray · Mar 26, 2018 go to post

I'm seeing extra whitespace characters at unexpected places in the code fragments you posted. For example between  $ and fromJSON(data)

What is your $ZVERSION value? The $-style methods got introduced at one point, then removed in a later version.

John Murray · Mar 26, 2018 go to post

I assume you are using Caché on Windows, and you are launching Terminal from the Cube on the local desktop of the PC where Caché is running.

In this case the security settings of the %Service_Console service (System > Security Management > Services) are what you need to adjust.

Enabling only "Unauthenticated" will mean that you don't get prompted for username/password, and your Terminal session will report $username="UnknownUser". But the security settings for UnknownUser will also have to allow that account to get to the programmer prompt. If they don't, your Terminal session won't start.

Enabling only "Operating System" will mean that provided a Caché user account exists that matches the Windows account you are logged into the desktop as, your Terminal session will report that username as its $username. Again, the Caché account will need sufficient permissions to get to the programmer prompt.

John Murray · Mar 13, 2018 go to post

I was wondering the same thing, seeing how Kevin referred to "directory" names. But given that he tagged the post as "Studio" I assumed he meant "package" rather than "directory".

John Murray · Mar 12, 2018 go to post

For my Studio, to toggle the menubar it seems to be View->Toolbars, and then choose Customize...

There, go to the Toolbars tab:

John Murray · Mar 12, 2018 go to post

This article has some more info about the status of an enhancement that I hope will mean we can hide system classes in Atelier Explorer in the same way as can already be done in Server Explorer.

John Murray · Mar 8, 2018 go to post

Any useful clues in cconsole.log file?

What does 'ccontrol stop INSTANCE001' report?

You might need to force the instance down, but perhaps best to consult WRC first.

John Murray · Mar 8, 2018 go to post

Indeed. As a consequence, some of our tools that check $ZV to tell if they're running on the InterSystems platforms or on one of the other M implementations have had to be modified to treat "IRIS" as equivalent to "Cache".

John Murray · Feb 28, 2018 go to post

This may look alarming, but all it's doing is destroying the local variable (you named it 'stream') that's referencing your stream object. And assuming it's the only variable referencing the object, the object will be destroyed, thus closing the file it had opened.

John Murray · Feb 27, 2018 go to post

Latest public releases of 2017.1 and 2017.2 are currently 2017.1.2 and 2017.2.1, so if you're encountering this issue you may need to request an ad-hoc build containing CDS2960.

John Murray · Feb 27, 2018 go to post

I guess he means Management Portal. And I wonder if a long-running SQL operation initiated from there might be adversely affected by a CSP Web Gateway timeout.

John Murray · Feb 26, 2018 go to post

This seems to be a simplified version of your earlier post. (Hint: you can edit a post at any time).

Per my suggestion on that post, have you looked at the cconsole.log files at both ends of the network connection?

Also, you tagged this post as "Compiler", but it's not clear how it relates to that.

John Murray · Feb 26, 2018 go to post

First, using my moderator superpowers I have moved this out of the Developer Community Feedback group (intended only for feedback about the DC platform) and into the Cache group.

The <NETWORK> error code hints that your Cache instance is involved in some ECP networking. Maybe that is having a problem. Check cconsole.log at both ends of the connection(s) for clues.

In general though, I suspect your issue is too site-specific for DC members to be of much help. I recommend you open a support ticket with InterSystems WRC.

John Murray · Feb 23, 2018 go to post

Also, a similar kind of check using a method of %SYSTEM.Security is not case-sensitive with respect to the username:

USER>w $system.Security.CheckUserPermission("laura_test_DEV","%Development")
USE
USER>w $system.Security.CheckUserPermission("laura_test_dev","%Development")
USE
USER>w $system.Security.CheckUserPermission("laura_test_devX","%Development")
 
USER>

John Murray · Feb 23, 2018 go to post

The priv check is case-sensitive on the username:

USER>w $system.SQL.CheckPriv("laura_test_dev","9,%Library.File_FileSet","e","USER")
0
USER>w $system.SQL.CheckPriv("laura_test_DEV","9,%Library.File_FileSet","e","USER")
1
USER>

Anyway, I'm glad it's now working for you.

BTW, to paste an image into a DC post I save it to a file, then use the following button in the DC editor to upload the file:

And then I sometimes (as above) use the Image button on the toolbar to add a 2-pixel border to the image, then the Increase Indent to move it across.

John Murray · Feb 23, 2018 go to post

Are you sure that you granted your test user the EXECUTE privilege on the procedure in the actual namespace where it will be executed?

I created a new user "laura" who only has the %Developer role. From the USER namespace in Terminal she can't prepare the class query:

USER>w $username
laura
USER>w $roles
%Developer
USER>
 
USER>s st=##class(%SQL.Statement).%New()
 
USER>s ok=st.%PrepareClassQuery("%File","FileSet")
 
USER>d $system.Status.DisplayError(ok)
 
ERROR #5540: SQLCODE: -99 Message: User laura is not privileged for the operation
USER>

Then in Portal I granted her EXECUTE on the procedure, per my previous screenshot, being careful to do this in the USER namespace. Now the test results are as follows:

USER>k
 
USER>s st=##class(%SQL.Statement).%New()
 
USER>s ok=st.%PrepareClassQuery("%File","FileSet")
 
USER>d $system.Status.DisplayError(ok)
 
USER>

And here are a couple of lines where I confirm that the user "laura" has the necessary privilege in the USER namespace but not in the %SYS namespace:

USER>w $system.SQL.CheckPriv("laura","9,%Library.File_FileSet","e","USER")
1
USER>w $system.SQL.CheckPriv("laura","9,%Library.File_FileSet","e","%SYS")
0
USER>

John Murray · Feb 23, 2018 go to post

A long shot: if auditing is turned on, and the %System/%Security/Protect  event is enabled, does anything get logged when the user encounters the failure?

Failing that, can you debug through the %PrepareClassQuery method of %SQL.Statement in the context where it's failing for you? Not so easy when the call works for your user when run in Terminal.

John Murray · Feb 23, 2018 go to post

I think your user Laura_Test_DEV needs to be granted a SQL permission to perform an EXECUTE on the relevant SQL procedure in whatever namespace you need:

John Murray · Feb 23, 2018 go to post

Based on your previous post I'm betting that your site has an INC file with content something like this:

#define Fza $za

Maybe the INC file also uses #if conditions to substitute different text when it's being used to build routines targeting different implementations of the M language.

John Murray · Feb 22, 2018 go to post

It didn't occur to me either! Interesting that the "Open Resource" dialog opted to use the term "camel case" instead.

John Murray · Feb 20, 2018 go to post

Many terminals, including the one with Cache, will respond to specific escape-sequences to hide and show the cursor. For example:

w ! w $c(27),"[?25l" w "Cursor hidden" h 5 w ! w $c(27),"[?25h" w "Cursor shown" h 5 w !

John Murray · Feb 20, 2018 go to post

I'm not aware of a way to do this directly. But in the case of routines (and classes) shown in Atelier Explorer (AE) these are files on your local filesystem. When I switch to the Project Explorer (PE) view, a right-click on a project gives me an option to "Show in Local Terminal", with a sub-option "Terminal". Choosing this gives me a new Terminal tab in another Eclipse pane. I'm working on Windows, and this Terminal gives me a Windows command shell in the root local directory of my project. There I can issue a suitable DIR command, e.g.

dir /s /o-d

For an equivalent on the server I suggest using Management Portal, which can be quickly launched from the context menu of a connection in the Server Explorer (SE) view. Once in Portal you can use System Explorer\Routines, and click on the Date header to sort the list by last modification date/time.

John Murray · Feb 20, 2018 go to post

Thanks for the tip Roger. As shown in your example, that dialog also does some clever stuff with CamelCase filters.