go to post Hans-Peter Iten · Nov 2, 2022 I think this has something to do with ECP timeout. Please start management portal and check System -> Configuration -> ECP settings.Default timeout = 1200 seconds (maybe you'll find there a value of 600).
go to post Hans-Peter Iten · Jun 9, 2022 "Unfortunately" ECP is the only method to connect remote databases. Maybe it's a license-server-problem. Could you please check that both instances are using the same license server? Let's say, both systems are placed in a domain jetsons.com. There are two systems each of them has a Caché-instance running. System-1 is called betty and system-2 called wilma. So we have:System1: betty.jetsons.com / Caché-Instance = barneySystem2: wilma.jetsons.com / Caché-Instance = fred System1: License-Port = 4001 (you may use another port instead of default), License-Server = betty.jetsons.comSystem2: Same licensing-information as on System1 (betty.jetsons.com:4001 (or another port you defined there) After doing so, restart both instances and check cconsole.log if license server was started on both systems. And if that doesn't help then you should contact WRC. Please keep in mind that the service ECP (Administration -> Security -> Services) must be running. Maybe you need an upgrade of the license. I remember that we had to do it when we installed a newer version. To do so you also have to contact Intersystems-WRC Hope, that will help you :-)
go to post Hans-Peter Iten · Jun 8, 2022 Does the other instance use the same license? All instances must use the multi server option
go to post Hans-Peter Iten · Apr 5, 2022 Do you mean this?: S sub1=111,sub2=444S TAB(""_sub1_""","""_""_sub2_"")="" zw TABTAB("111"",""444")=""
go to post Hans-Peter Iten · Mar 28, 2022 Another possibility to get freespace is to compact the database: %SYS> Do ^DATABASE -> Compact globals in a database
go to post Hans-Peter Iten · Mar 14, 2022 You could also use the class %SYS.Journal.File Example:Set JournalFile = ##class(%SYS.Journal.File).%OpenId(EXISTING_JOURNAL_FILE)Set JournalRecord = JournalFile.FirstRecordGet()While (JournalRecord '= "") { Here you can program your search criteria example: If JournalRecord.%IsA("%SYS.Journal.SetKillRecord") { insert your code}} Check documentation for further hints.
go to post Hans-Peter Iten · Nov 29, 2021 The documentation might be a little bit long, so I try to make it short. If you write down some kind of logic in COS and save it, then you'll get a routine. The easiest way to create a routine is this, using a terminal session: ZR<ret><tab>WRITE $H<ret>ZS<space>MYROUTINE. (<this are the corresponding control characters>)Doing so, you'll get an INT file called MYROUTINE.INT. You can see it using %RD in a terminal session in the namespace where you saved the routine. You can run it using the command DO ^MYROUTINE or GO ^MYROUTINE A routine may contain some labels (some name ended with a TAB) which you can use as functions or procedures. A routine is comparable with a class but you can't instanciate a routine like you can do with a class and it does not contain methods or classmethods. Global is an array stored on disk. It is a nice datastructure to save your data. A routine can write, store or delete some data stored in Global. Hope this helps to make the things clear to you
go to post Hans-Peter Iten · Nov 17, 2021 Did you check if checkbox named 'Enable long strings' is enabled (checked)? (ManagementPoral -> Configuration -> Memory and startup)?
go to post Hans-Peter Iten · Dec 24, 2020 Before switching to Windows Server 2019 we also used Bitvise. Fortunately Windows Server 2019 comes with OpenSSH (it can be installed as a windows feature). OpenSSH works pretty good and so we don't have to pay for the Bitvise license any longer.
go to post Hans-Peter Iten · Oct 20, 2020 Hello Paras, you can't modify $ZIO. When you create a file ABC_1.txt, $ZIO points to this file. When you create a file ABC_2.txt then $ZIO points to this file. Because Unix doesn't know version numbers, you must implement your own file version counter into your library.We were confronted with the same problem. We solved it by checking the existing files (doing a directory listing into a local array) estimate the highest version number and incremented 1 to that number. After getting the latest file version number we create the filename. We wrote a wrapper around the class %Library.File. I know, that it is not perfect to browse the current directory to find all files and extract the version number out of a part of the filename. But I didn't find a better solution. Best regardsHans-Peter
go to post Hans-Peter Iten · Oct 19, 2020 Hello Paras, to understand the way Caché distinguishes between the files, you can use the special variable $ZIO. This returns the full filename. Example: SET FILE="ABC.TXT" O FILE:"N" USE FILE SET FULLFILE=$ZIO USE $PRINCIPAL WRITE $ZIOIf you run this example in two separate terminal sessions then you see, that the version number is incremented. When you do this in the same terminal session and don't close the file then the version number is NOT incremented. The fileversion will be incremented, when the file has been closed (... USE FILE SET FULLFILE=$ZIO CLOSE FILE OPEN FILE:"N" USE FILE SET FULLFILE=$ZIO...).When you check the content of FULLFILE you'll find the full filename including the version number. When another process does the same, another file handle is created and if you check $ZIO then you'll see, that this process is using another file version.
go to post Hans-Peter Iten · Sep 14, 2020 At first sight it might be very cool to have code for methods in a few lines. It is the way of programming we had in the past times. I can't recommend to use this way of coding, because it makes it very hard to read and understand the logic of code. I grew up with this kind of coding so I am very familiar with this but I am happy that Caché gives me the way to code in a modern style. When I look into my old programs, which consist of this kind of coding, then I always feel to read ugly code. I would like to change it immediately. Forget it to compact the code in one line. Put it into more lines and avoid postconditionals. If-statements are more readable and you don't have to think about what the code will do. Nice satiric article
go to post Hans-Peter Iten · Jun 24, 2020 It is not normal, that the port is changing. Caché database uses port 1972 as default for connections. It remains number 1972 until you change it in the configuration. If there are changes in the port number then you should first find out where the reason for the changes comes from. Maybe there are some hints in cconsole.log.
go to post Hans-Peter Iten · Jun 24, 2020 Hi Paul, what is your intention to do so? What kind of error do you get?
go to post Hans-Peter Iten · Apr 6, 2020 You can call methods from command line even like you call routines. Imagine you have a class Test in package TestClasses and a method printData which prints the data to your output device. Then you can call csession instance -"U" namespace "##class(Test).printData("""data""")". Of course the methods must be ClassMethods. You must test the number of " - signs. In PowerShell for instance I needed around 14(! sic) "-signs to send a valid command to Caché. Here the example: csession ${INSTANCE} -"U" ${NAMESPACE} "##class(TestClasses.Test).printData(""""""""""""""hello"""""""""""""")" hello
go to post Hans-Peter Iten · Feb 20, 2020 If ctrl+c doesn't work, then you can terminate the session using the program JOBEXAM and terminate the job which uses %SYSMONMGR. To do so just open another terminal window.
go to post Hans-Peter Iten · Feb 14, 2019 I solved this problem myself:Suppose you switched (cd) into bin-directory of caché installation:PS> .\csession myCache -U myNamespace "##class(test.OsCall).inString(""""""""""""""$string"""""""""""""")"$string contains some text