go to post Robert Cemper · Jul 18, 2019 the popular use of is INTERACTIVE.But there is a BATCH option: SAMPLES>zn "%SYS" %SYS>d BATCH^GBLOCKCOPY 1) Manage Batches 2) Run a Batch 3) Restart a Batch 4) Add Processes to a running Batch 5) Stop a Running batch 6) Monitor Running Batch 7) Batch Report 8) Exit Option? 1 1) Create a Batch 2) Edit a Batch 3) List Batches 4) Delete a Batch 5) Exit Option? I never used it myself. it seems to me you should find it in ^%SYS("GBLOCKCOPY") But the source code is open in %SYS and easy to read: BATCH w ! w !,"1) Manage Batches" w !,"2) Run a Batch" w !,"3) Restart a Batch" w !,"4) Add Processes to a running Batch" w !,"5) Stop a Running batch" w !,"6) Monitor Running Batch" w !,"7) Batch Report" w !,"8) Exit" w ! s Option=$$OPTION("Option? ",8,8) i Option=1 d BATCHMANAGE g BATCH i Option=2 d BATCHRUN g BATCH i Option=3 d BATCHRESTART g BATCH i Option=4 d BATCHADDPROCESSES g BATCH i Option=5 d BATCHSTOP g BATCH i Option=6 d BATCHMONITOR g BATCH i Option=7 d BATCHREPORT g BATCH qBATCHMANAGE w ! w !,"1) Create a Batch" w !,"2) Edit a Batch" w !,"3) List Batches" w !,"4) Delete a Batch" w !,"5) Exit" w ! s Option=$$OPTION("Option? ",5,5) i Option=1 d BATCHCREATE g BATCHMANAGE i Option=2 d BATCHEDIT g BATCHMANAGE i Option=3 d BATCHLIST g BATCHMANAGE i Option=4 d BATCHDELETE g BATCHMANAGE qBATCHCREATE s $zt="BATCHE" s Name=$$GETNAME("Batch name to create? ",0,0) q:POP f w !!,"Adding to batch: "_Name d BATCHSETUP q:POP g BATCHCREATEBATCHEDIT s $zt="BATCHE" s Name=$$GETNAME("Batch name to edit? ",1,0) q:POP s Status=$$GETSTATUS(Name,1) i $p(Status,"~",4)'="Queue" w !,"Batch "_Name_" has been run, please re-enter" g BATCHEDIT i $$YN("Do you want to add to the batch","Y")="Y" f w !!,"Adding to batch: "_Name d BATCHSETUP q:POP i $$YN("Do you want to delete entries from batch "_Name,"N")="N" g BATCHEDITBATCHEDIT1 d SUMMARYREPORT(Name,0) s Option=$$OPTION("Delete which entry? ",0,+$o(^|"^^"_$zu(12)|%SYS("GBLOCKCOPY",Name,""),-1)) i Option=0 g BATCHEDIT . . . . . . . . HTH,
go to post Robert Cemper · Jul 18, 2019 Sorry, this is a description of how to run a program of WINDOWS or LINUX from Caché.What you address here ar Caché Routines or ClassMethods.
go to post Robert Cemper · Jul 18, 2019 are you looking for this ?Execute Server Commands from Caché / Ensemble / IRIS
go to post Robert Cemper · Jul 17, 2019 to count the number of changes you may use this approach Set ^Data("Cambridge") = "1" if $increment(change("Cambridge")) Set ^Data("New York") = "2" if $increment(change("New York")) Set ^Data("Boston") = "3" if $increment(change("Boston")) Set ^Data("London") = "4" if $increment(change("London")) Set ^Data("Athens") = "5" if $increment(change("Athens")) Set ^Data("Athens") = "6" if $increment(change("Athens")) Set ^Data("Athens") = "7" if $increment(change("Athens")) zw change change("Athens")=3 change("Boston")=1 change("Cambridge")=1 change("London")=1 change("New York")=1
go to post Robert Cemper · Jul 13, 2019 "using object methods while running the report"This is a rather generic statement.If you are using CLASS METHODS (as I 'd assume) you can project each class method as Stored SQL Procedure too.By this, you can make them available to be used over JDBC.Could be an eventual workaround.
go to post Robert Cemper · Jul 12, 2019 This is a rather common misunderstanding.The naming GLOBAL was created in the 60ties.Long before any other programming language even had anything named Global or similar.GLOBAL in Caché is a persistent storage component that builds the backbone of (SQL) Tables and Persistent Objects.see this documentation: Using Caché Globals
go to post Robert Cemper · Jul 12, 2019 Excellent & valid comment !I didn't think of this difference before.
go to post Robert Cemper · Jul 11, 2019 OK !They look rather similar.BUT:Process Private Globals are "unlimited". Clear there is a physical limit, but it's far away compared to local variables.PPGs are best suited as Storage location + Index location of temporary tables.Without limit as any ordinary Global. So it depends on your needs.
go to post Robert Cemper · Jul 10, 2019 the data property is a standard HTML page.I'm not aware of some function in Caché that converts HTML to JSON.But asking Google "convert HTML to JSON" shows that this a standard feature in JavaScript. so I see 2 options:- write your own parser (or someone in the community has done this before ???) - call an external tool (eg. node.js) to it for yousee: https://stackoverflow.com/questions/34504050/how-to-convert-selected-html-to-jsonor https://stackoverflow.com/questions/12980648/map-html-to-jsonor https://stackoverflow.com/questions/43469412/convert-html-source-code-to-json-object
go to post Robert Cemper · Jul 10, 2019 it's not related to ENS . the error is pure HTTP<Ens>ErrHTTPStatus: Received non-OK status 404 from remote HTTP server: 'HTTP/1.1 404 Not Found':<html>simply tells you that your URL is wrong.try it in browser to verify it exists
go to post Robert Cemper · Jul 8, 2019 as a quick approach: set instring="........whatever you need .........." set len=75 for part=0:1 { set segment=$extract(instring,part*len+1,part+1*len) do OBX(segment) if $length(instring)<(part+1*len+1) quit ; nothing left } ;;; have no details how OBX looks like but this are the pieces
go to post Robert Cemper · Jun 29, 2019 I prefer this solution as it is in full accordance with the documentation andwith no need also for beginners to fiddle into internals .https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=RCOS_flist<snip>$LIST(list,position,end) returns a “sublist” (an encoded list string) containing the elements of the list from the specified start position through the specified end position (inclusive). If position and end specify the same element, $LIST returns this element as an encoded list.</snip>
go to post Robert Cemper · Jun 28, 2019 (XMLPROJECTION="wrapped");should separate your items.from docs: https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GXMLPROJ_basics#GXMLPROJ_basics_collectionsEffect of XMLPROJECTION on Collection PropertiesValue of XMLPROJECTIONEffect on Collection Properties"WRAPPED"The property is projected as an element with subelements; each subelement corresponds to an item of the collection. This is the default for collection properties."ELEMENT"Each item in the collection is projected as an element, without being wrapped in the parent property.
go to post Robert Cemper · Jun 27, 2019 I miss Public { } in your exampleit ensures that only parameters are visible as <Private variables> or all %*
go to post Robert Cemper · Jun 27, 2019 MyFunc(Param1,Param2) Public { if $d(Param2) write " 2 params",! else write " 1 param",! S Param2="it's all good" Q 1 }
go to post Robert Cemper · Jun 27, 2019 did you try to Save your Stream.Container ?set tSC = tRequest.%Save()before set tSC = ..SendRequestAsync(..TargetConfigNames,tRequest)
go to post Robert Cemper · Jun 22, 2019 Did you check your license capacity? looks like running out of license slots.
go to post Robert Cemper · Jun 20, 2019 my personal rule:In the development stage, programmers should have full access but data are anonymized.In the test stage - only some qualified developers get limited accessin the production stage, neither users nor developers should have access to the studio or terminal.Access is given only temporary, to top experts for error analysis.That's like the doctors that take care of places of your body you won't' show to anybody else.
go to post Robert Cemper · Jun 20, 2019 Yeah!you can lock out developers from SMP.But you can't prevent them from writing code with similar functionality. And run it.And then you have the same SYSTEM privileges as your Caché installation has. It might be hard to block it.For stronger security block all developers on production systems.