You can also start Caché in Emergency mode : https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KE…
- Log in to post comments
You can also start Caché in Emergency mode : https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KE…
Hi Kevin,
Try 'Do ^%RFIND' to find out in what code these globals are referenced.
Ok, this is a test i wrote to add some basic source control (auto save of class and manually exporting the current project). It shows how you can add 2 menu items.
Don't forget to activate the source control class for a namespace in the portal (admin-config-additional settings-source control)
I wrote a class to extend %Studio.Extension.Base, i don't see any other way to add items in Studio.
If you want, i can post a skeleton class where you can start with.
Yes, tried it and it works,
Danny
Hi Matthew,
This should not add a lot of extra trafic - especially if you only enable the events you need to monitor (e.g. only enable login failure).
Since the server version is Iris, it is better to use the latest ODBC driver from Iris ...
Hi Matthew,
Can you enable auditing, enable the system event 'login failure' and check for login failures in the audit database ?
Do you have enough license available?
If property altura would be of type %Integer, you could use parameter d :
d - output Caché numeric properties that have value "" as null
As string, i don't see any parameters in %WriteJSONStreamFromObject that would return null in stead of "".
Personally, I am setting the json myself to have total control of JSON output like
Write "Happy new year" ![]()
Hi Muhammad,
Remove the 'Extends %Net.HttpRequest' : it is not needed to inherit from this class.
Since the method Get is already defined in that class, it gives a compiler error when you overwrite a class with a different signature (classmethod).
And if you just want a function to return hijri dates, you van try following build-in $zdate function :
Write $zdate($zdateh("2021-09-24",3),19),!
16 2 1443You can also try ,18 which gives 16 Safar 1443
Hi Muhammad,
Create following class :
Class Test.Json{
ClassMethod Get(date = "24-09-2021", debug = 0) As %String{ #Dim status as %Status #Dim response as %Stream #Dim jsonResponse as %DynamicObjectSet objHttp = ##class(%Net.HttpRequest).%New() Set objHttp.Server="api.aladhan.com" Set objHttp.Https=0 Do objHttp.SetParam("date",date) Set status = objHttp.Send("GET","v1/gToH") If status'=1 Do $SYSTEM.OBJ.DisplayError(status) Quit "" If objHttp.HttpResponse'="" Do Set response = objHttp.HttpResponse.Data Set jsonResponse = ..GetResponse(response) If debug Write jsonResponse.data.hijri.%ToJSON(),! Return jsonResponse.data.hijri.date}
ClassMethod GetResponse(response As %Stream, del As %String = "") As %DynamicObject{ #Dim jsonStr as %String = "" If response'="" { Do response.Rewind() While 'response.AtEnd { Set jsonStr = jsonStr _ response.ReadLine() _ del } } Quit {}.%FromJSON(jsonStr)}
}and call it like :
USER>set hijri=##class(Test.Json).Get()
USER>write hijri
16-02-1443
USER>set hijri=##class(Test.Json).Get(,1)
{"date":"16-02-1443","format":"DD-MM-YYYY","day":"16","weekday":{"en":"Al Juma'a","ar":"الجمعة"},"month":{"number":2,"en":"Ṣafar","ar":"صَفَر"},"year":"1443","designation":{"abbreviated":"AH","expanded":"Anno Hegirae"},"holidays":[]}
USER>Write ##class(Test.Json).Get("01-08-2021")
22-12-1442
USER>Hi Kevin,
the variable statStr should be known inside your loop, e.g. following routine works fine in SAMPLES :
test ;
set statStr = "aa|bb|.." set sqlStatement = "Select * From Cinema.Film" set tState = ##class(%SQL.Statement).%New() set qStat = tState.%Prepare(sqlStatement) set rset = tState.%Execute() WHILE rset.%Next() { Write rset.%GetData(1), " ",$Piece(statStr,"|",1),! } QuitHi Brandon,
There are some limitiation to the free Iris license :
More details on https://docs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cl…
Can you show the class definition ? Maybe it is better to try to find out why your iFilter is not taken as the best option for this query.
Hi Lutz,
You have to assign your new %DB_Database1 & 2 resources to database1 & 2 (via System Admin -> Configuration->local databases-> click on database1 & 2 and change Resource Name to %DB_Database1 & 2
Can you try again with the slash (since it is windows, you have to use the slash) :
iris start irishealth /EmergencyId=user,password
Can you show the output of 'iris all' ?
Which is your OS ?
You have to include a slash before EmergencyId :
iris start iris /EmergencyId=userA,pwB
Also, make sure that 'iris' is indeed your instance name (use 'iris all' to show all instances)
Several companies in Belgium as well :
Hi Joan,
hmm, running out of ideas,
can you create a new namespace (or use e.g. USER if not used), and map some routines from your database to that namespace. Is Studio also slow in that namespace ?
If your partners work in the same namespace without any problems, you might want to reset the Studio settings to default, or use their settings:
Studio menu Tools -> Import and Export Settings
First export your settings as a backup, and than reset All settings (or import a setting from a partner)
Hi Joan,
Are there many routines in the namespace ? Is the studio faster on other namespaces ?
Any special mapping in the namespace ?
Have you tried creating a new namespace and exporting/importing some routines to that namespace ? (or map routines to the new namespace)
In terminal :
USER>d ^%RCOMPIL Routine(s): * Routine(s): Display syntax errors? Yes => Yes Display on Device: Right margin: 80 => Compiling in namespace USER at 11:26:55 xxx.MAC xxx3.MAC ... nn routines compiled with 0 errors at 11:26:55 in 00:00:00.029
In portal : System Explorer -> Routines
.png)
This has probably to do with underscores ( _ ) in variable/method names. (not allowed in object script, but used with callbacks in the (deprecated) product VISM (or also called Cache Direct, hence the CD and CalBk in the error)
I get a similar error when doing :
%SYS>set _abc=1 <FUNCTION>SetProp+2^%CDCalBk %SYS 3d1>
From the documentation :
Invalid Names
A local variable name that does not follow the above naming conventions generates a
Do you use CSP pages or REST (through portal or other applications) ? It uses a grace period that can hold a license slot longer than the actual login time.
You can look at the license usage in the Management Portal :
- Click on View System Dashboard, in Licensing tab :.png)
You can click on Current License Use, and click on the bottom of the page on 'Click here for more details' to go to the License Usage page (also accessible via System Operation -> License Usage)
You can view the same figures in terminal by using Do $system.License.ShowSummary()
(Look at Do $system.License.Help() for other methods to show license stats.
Hi Daniel, did you do a zwrite output ? It is an array, so if output=2 there should be more data in it.
(usually output is empty when the command was executed successfully)
I like using using OPEN because any shell output message is captured and can be logged.
e.g.
do ##class(Image.Utils).Convert("a.jpg","-resize 10X10", .output)
zwrite output
output=2
output(1)="convert: UnableToOpenBlob 'a.jpg': No such file or directory @ error/blob.c/OpenBlob/3109."
output(2)="convert: MissingAnImageFilename `10X10' @ error/convert.c/ConvertImageCommand/3272."I am using read queue to be able to monitor the output from Image like this :
Parameter INSTALLDIR = "c:\ImageMagick\";
/// Do ##class(Image.Utils).Resize(file, newFile500, "500X500", .msg)ClassMethod Resize(fileOrig As %String, fileNew As %String, newSize As %String, ByRef output as %String) As %Boolean{ Quit ..Convert(fileOrig, "-resize "_newSize_"^> """_fileNew_"""", .output)}
ClassMethod Convert(file, options, ByRef output as %String) As %Boolean{ Do ..Cmd("convert """_file_""" "_options, .output) Quit 1}
ClassMethod Cmd(command As %String, ByRef outputStr As %String){ Kill outputStr Try { Set cmd=..#INSTALLDIR_command Open cmd:("RQ") For { Use cmd Read line If $ZEOF=-1 Quit Set outputStr($i(outputStr))=line } } catch { } Close cmd}Look at the %Dictionary tables, you can find the docs here :
https://docs.intersystems.com/irislatest/csp/documatic/%25CSP.Documatic…
Also look at following answer for examples :
https://community.intersystems.com/post/example-list-persistent-classes…