go to post Robert Cemper · May 3, 2018 I agree and have suffered over years.I think for Caché and its derivates it's somewhat late in the life cycle.Eventually with iris ? Should be worth an enhancement request
go to post Robert Cemper · May 1, 2018 Great!SAMPLES>w !! do $system.OBJ.ExportUDL("Sample.Company.cls")/// This sample persistent class represents a company.<br>Class Sample.Company Extends (%Persistent, %Populate, %XML.Adaptor){/// Define an index for <property>Name</property>.Index NameIdx On Name [ Type = index ];/// Define a unique index for <property>TaxID</property>.Index TaxIDIdx On TaxID [ Type = index, Unique ];/// The company's name.Property Name As %String(MAXLEN = 80, POPSPEC = "Company()") [ Required ];/// The company's mission statement.Property Mission As %String(MAXLEN = 200, POPSPEC = "Mission()");/// The unique Tax ID number for the company.Property TaxID As %String [ Required ];/// The last reported revenue for the company.Property Revenue As %Integer;/// The <class>Employee</class> objects associated with this <class>Company</class>.Relationship Employees As Employee [ Cardinality = many, Inverse = Company ];------<skip rest> -------
go to post Robert Cemper · Apr 30, 2018 Thank you Tim!You finally gave me a hint why to use [ ProcedureBlock = 0] or [PublicList = (x1, x2) ]as a Method_Parameter. I never saw serious reasons for it.
go to post Robert Cemper · Apr 30, 2018 and BTW, what's dynamic about it?do you mean an array x(Counter) ????
go to post Robert Cemper · Apr 30, 2018 underscore (_) is not allowed in variable nameshttp://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GORIENT_appx_identifiers_cos_localvarseventually, you mean set @("x"_Counter) = DIAGSXECUTE ("set x"_Counter_"="""_DIAGS_"""") should work too
go to post Robert Cemper · Apr 27, 2018 no need to excuse.the wording (and help text) sometimes not really guiding.but you motivated me to use more screenshot for explanations.
go to post Robert Cemper · Apr 27, 2018 to access remote tables you should use LInk Table to work in both directionsI wrote this already in line 2 of my answer to this question 2 weeks agohttps://community.intersystems.com/post/cache-sql-insert-external-database##node-446881
go to post Robert Cemper · Apr 27, 2018 you remind me the joke about hieroglyphs:- What's wrong with them?- Nothing! Priests in old Egypt were reading the "book of death" like you would read a newspaper.- You just have to learn the 'encryption'.
go to post Robert Cemper · Apr 27, 2018 Thanks for the clarification.It's sometimes hard to guess the picture if you miss some pixels.I'd still recommend moving the CLOSE after each inner loop to have OPEN / CLOSE strictly pairedThe implicit CLOSE happens only if you exit the partition. There's no class to act undercover. Curly braces just structure the code with no operational side effect.
go to post Robert Cemper · Apr 27, 2018 It seems you have manually changed the class definition.A normal RegisterdObject has no storage definition.from <Type>%Library.CacheStorage</Type> i see it was a %Rersitent before.Storage Default{<Data name="EOBListDefaultData"><Subscript>"EOBList"</Subscript><Value name="1"><Value>EOBList</Value></Value></Data><DefaultData>EOBListDefaultData</DefaultData><Type>%Library.CacheStorage</Type>}remove Storage and recompile.
go to post Robert Cemper · Apr 26, 2018 I finally succeeded in reproducing your errorERROR #5803: Failed to acquire exclusive lock on instance of '%Studio.ProjectItem'The conditions are somewhat strange and you should take an exact check what applies in your case.The story:ENSEMBLE uses %Studio.Project to manage the export.every item to be exported gets locked. The global name to look for is ^oddPROJECTif the number of items exceeds a threshold the whole Project storage will be lockedthis is NOT possible if someone else has any other project in this namespace locked for himthen the export will fail and you get the ERROR message. So try to find out in TerminalUSER>zn "%SYS"%SYS>write $system.SQL.GetLockThreshold() ; most likely default => 1000xxxxxx%SYS>d ^LOCKTAB LOCK table entries at 16767728 bytes usable, 16774528 bytes available.Entry Process X# S#Flg W# Item Locked 1) 1016 1 ^["^^c:\intersystems\17e20\mgr\"]%SYS("CSP","Daemon") 2) 6444 1 ^["^^c:\intersystems\17e20\mgr\"]ISC.LMFMON("License Monitor") 3) 6752 1 ^["^^c:\intersystems\17e20\mgr\"]ISC.Monitor.System 4) 12180 1 ^["^^c:\intersystems\17e20\mgr\"]TASKMGR 5) 8568 1 ^["^^c:\intersystems\17e20\mgr\user\"]oddPROJECT("Ali") Command=>Look if you see oddPROJECTNext try to estimate the number of items your production will export.If you get close to the dimension of xxxxxx then you run most likely into your error.Be aware that some components can create more than 1 entry. So your limit might be lower (70% ??)You can increase the threshold inMgmtPortal > System Admin > Configuration > SQL and Object Settings > General SQL SettingsATTENTION: If you set this value to high you risk an overrun of the LOCKTABLE. This blocks the whole instance. Increasing the size of LOCKTABLE + Restart is then required. Or you set the limit t back.
go to post Robert Cemper · Apr 26, 2018 I miss 3 things in this example:There is a condition: I found no IF nor anythingat the end of the inner loop there is no CLOSE file1 7 / CLOSE file2 for file1 or file2OPEN file:("WNS": ......) W - Write is okS - Stream mode is OKN - i s questionable. if you are not on VMS you override the file at each outer loophttp://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GIOD_rmsseqfiles#GIOD_rmsseqfiles_useNew file. If the specified file does not exist, the system creates the file. If the specified file already exists, the system creates a new one with the same name. The status of the old file depends on which operating system you are using. On UNIX® and Windows, Caché deletes the old file. (Note that file locking should be used to prevent two concurrent processes using this parameter from overwriting the same file.) So to get all output you may append arrayIndex to filename to have unique file names
go to post Robert Cemper · Apr 26, 2018 as you noted SEEMS not to work.method OnInit() as %StatusThis user callback method is called via initConfig() from %OnNew() or in the case of SOAP Services from OnPreSOAP() $$$LOGINFO("INIT") translates to Do ##class(Ens.Util.Log).LogInfo($$$CurrentClass,$$$CurrentMethod,"INIT")I'd suggest to replace it by set ^Antonio($i(^Antonio))=$lb($ZDT($h,3),"INIT")so so find out if your Init gets called or not or multiple times, .. Especially during init phase high independence from the rest could be useful
go to post Robert Cemper · Apr 26, 2018 My final idea:- restart the whole ENSEMBLE instance to get rid of anything that might be hidden/hanging around in memory. It's not my preferred solution, but with the actual information, nothing else seems to work. If someone starts screaming you may have identified you opponent that blocks you. - if the problem persists further then contact WRC
go to post Robert Cemper · Apr 25, 2018 I did more research on %Studio.ProjectItem:In the actual version there is no chance to such a lock situation.Export is using a lot of %Studio classes. So either a Studio instance or some other editing blocks something.BTW: what version of ENSEMBLE do you use ?
go to post Robert Cemper · Apr 25, 2018 From your screenshot, I see that you have a running production.#1) ENSEMBLE has an internal locking not seen in LOCKTABLE.#2) If you try to export the actual running production this might be you might get in conflict with this internal protection.I found no note that you can't export a running production.Though I've never heard of such attempt as a production consists many dynamic moving parts.Suggestion: STOP the production you want to export and then try the export again.
go to post Robert Cemper · Apr 25, 2018 Documento Nacional de Identidad (Spain)https://en.wikipedia.org/wiki/Documento_Nacional_de_Identidad_(Spain)
go to post Robert Cemper · Apr 25, 2018 Salva, that's Great!without having to change the class definitionI like this. Robert