Robert Cemper · Aug 10, 2019 go to post

Zen Application is the "package" you call from a browser and typically sets a common design.
Zen Pages are the individual web pages that make up your application.
Client Methods is JavaScript executed in your browser.
Server Methods run on the Caché Server and interact with the Zen page using HyperEvents.

I'd suggest you take a tour through the docs for details. 

 

Using Zen      Introduces Zen, the InterSystems framework for web application development.

Developing Zen Applications     
Addresses advanced Zen application programming issues such as security, localization,
client side layout management, and custom components.

Robert Cemper · Aug 10, 2019 go to post

you operate not on document object but on zenPage object

see docs:  Client Side Functions, Variables, and Objects  at the beginning >>>

  • Find a Zen component by id value. Returns the object that matches the input id.

  • The zen(id) JavaScript function is equivalent to the following client-side JavaScript method call on the page object:

  • zenPage.getComponentById(id)

  • You can use the zen(id) function wherever JavaScript syntax is appropriate; 

Robert Cemper · Aug 9, 2019 go to post

but that way

USER>f a=0.8:.1:2.2  w a,?7,a\1+(a#1>0*1),?10,!
.8     1
.9     1
1      1
1.1    2
1.2    2
1.3    2
1.4    2
1.5    2
1.6    2
1.7    2
1.8    2
1.9    2
2      2
2.1    3
2.2    3

wink

Robert Cemper · Aug 8, 2019 go to post

In namespace %SYS you have the utility  ^JRNDUMP  which displays the content of journal files in "readable" text format.
You may need to adapt it to your requirements.

Journal: c:\intersystems\cache\mgr\journal\20190808.004
   Address   Proc ID Op Directory        Global & Value
===============================================================================
    131088      6600 S  c:\intersystems+ %SYS("SERVICE","ECPCluster") = 0
    131152      6600 S  c:\intersystems+ %SYS("LASTSESSIONGUID") = "5ª"_$c(9)_"+
    131224      6600 BT
    131240      6600 ST c:\intersystems+ %SYS("SERVICE","ECPSessionVersion") = 2
    131316      6600 CT
    131644     10960 S  c:\intersystems+ SYS("LastLicenseKey") = "LicenseCapaci+
    132620      2600 S  c:\intersystems+ SYS("Security","UsersD","unknownuser")     132692     10960 K  c:\intersystems+ SYS("CLMANAGER")
    132740     10960 S  c:\intersystems+ SYS("CLMANAGER") = 1
    132792     10960 S  c:\intersystems+ SYS("CLMANAGER",1) = $c(127,0,0,1,15)_+
    132848     10960 S  c:\intersystems+ SYS("CLMANAGER",1,"started") = 1

Depending on your activities in the DB  this may take many many GB !
I'd suggest examining the content first from Mgmt Portal to see if this is what you expect. 

Robert Cemper · Aug 7, 2019 go to post

the class documentation has a special warning:

The table for this class should be manipulated only through object access,
the published API's or through the System Management Portal.
It should not be updated through direct SQL access.

As Security is a sensitive subject I think any other approach could cause serious damage or at least a risk.

Robert Cemper · Aug 7, 2019 go to post

<ZSOAP> is just a summary not more meaning than "there was an error"

for the details, I'd suggest to analyze variable %objlasterror

eg. set detail=$system.Status.GetErrorText(%objlasterror)

set fault.detail="<mymessage>"_detail_"</mymessage>"

Robert Cemper · Aug 7, 2019 go to post

An upgrade from Caché to Ensemble is not foreseen. 

Install ENSEMBLE in parallel to Caché and include your Caché Databases to Ensemble as you need.  

Attention: Ensemble is always running in Unicode!

Robert Cemper · Aug 7, 2019 go to post

You find it in 

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Intersystems\Cache\Servers\<YourServer>

I found it by searching some  Webserver Port with regedit.exe 

Robert Cemper · Aug 5, 2019 go to post

Suggested approach:
Create a  namespace %ALL which is visible to all other namespaces and map the common class/table into it.
with global, package, routines whatever is related to it. 

See Mapping Data to All Namespaces  link

Robert Cemper · Jul 31, 2019 go to post

Oh dear!  It's incredible!

yesyesyes​​​​​​​yes​​​​​​​yes​​​​​​​​​​​​​​

Robert Cemper · Jul 31, 2019 go to post

c'mon - it even works with text files:

USER>s file="fizzbuzz.txt"
 
USER>o file:"WNS":0 W $t
1
USER>u file f i=1:1:100 w:i#3=0 "Fizz" w:i#5=0 "Buzz" w:'$x i w !
 
USER>c file
 
USER>$type fizzbuzz.txt
 
1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
FizzBuzz
Robert Cemper · Jul 31, 2019 go to post

it doesn't show numbers at end  
if you run it as single line command in a standard Caché terminal supporting $X,$Y.

newline sets $x=0, $i($Y)

USER>f i=1:1:100 w:i#3=0 "Fizz" w:i#5=0 "Buzz" w:'$x i w !
1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
FizzBuzz
16
17
Fizz
19
Buzz
Fizz
22
23
Fizz
Buzz
26
Fizz
28
29
FizzBuzz
31
32
Fizz
34
Buzz
Fizz
37
38
Fizz
Buzz
41
Fizz
43
44
FizzBuzz
46
47
Fizz
49
Buzz
Fizz
52
53
Robert Cemper · Jul 21, 2019 go to post

I stated:

name your config SMP<port>  that is SMP57772 or just 57772

then the config name reflects the SMP port

Robert Cemper · Jul 20, 2019 go to post

on WIN  the config name is burned  into the registry 

Computer\HKEY_CURRENT_USER\Software\InterSystems\Cache\Configurations\......

UNIX/Linux has some structure simulating Win_Registry.  Support experts will know the details. 

Robert Cemper · Jul 20, 2019 go to post

Hi Evegeny,

I found nothing sophisticated but very straight.

just from any namespace or routine / method.

USER>w ^%SYS("SSPort")  ;;SuperServer
1972
USER>w ^%SYS("WebServer","Port")  ;; WebServer
57772
USER>
Robert Cemper · Jul 19, 2019 go to post

ENSEMBLE may have some signal mechanic.

BUT at Caché level you still have Special Variable $HALT as the last chance handler.
all details https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=RCOS_vhalt

Most important: 

If you have $HALT set and also have code defined for ^%ZSTOP when a HALT is issued, the $HALT is executed first. $HALT can prevent the termination of the process, if its halt trap routine does not contain a HALT command.   !!!!

Robert Cemper · Jul 19, 2019 go to post

if you test your example from terminal prompt it needs some important change:

open file:("WNS"):3
if ('$test{  write !,"Failed to open "_file  quit  }
use file do ALL^%SS      ;; must be the same line
close file
quit

Robert Cemper · Jul 18, 2019 go to post

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
 !
 !,"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=$$OPTION("Option? ",8,8)
 Option=1 BATCHMANAGE BATCH
 Option=2 BATCHRUN BATCH
 Option=3 BATCHRESTART BATCH
 Option=4 BATCHADDPROCESSES BATCH
 Option=5 BATCHSTOP BATCH
 Option=6 BATCHMONITOR BATCH
 Option=7 BATCHREPORT BATCH
 q
BATCHMANAGE
 !
 !,"1) Create a Batch"
 !,"2) Edit a Batch"
 !,"3) List Batches"
 !,"4) Delete a Batch"
 !,"5) Exit"
 !
 Option=$$OPTION("Option? ",5,5)
 Option=1 BATCHCREATE BATCHMANAGE
 Option=2 BATCHEDIT BATCHMANAGE
 Option=3 BATCHLIST BATCHMANAGE
 Option=4 BATCHDELETE BATCHMANAGE
 q
BATCHCREATE $zt="BATCHE"
 Name=$$GETNAME("Batch name to create? ",0,0) q:POP
 f  !!,"Adding to batch: "_Name BATCHSETUP q:POP
 BATCHCREATE
BATCHEDIT   $zt="BATCHE"
 Name=$$GETNAME("Batch name to edit? ",1,0) q:POP
 Status=$$GETSTATUS(Name,1)
 $p(Status,"~",4)'="Queue" !,"Batch "_Name_" has been run, please re-enter" BATCHEDIT
 $$YN("Do you want to add to the batch","Y")="Y" f  !!,"Adding to batch: "_Name BATCHSETUP q:POP
 $$YN("Do you want to delete entries from batch "_Name,"N")="N" BATCHEDIT
BATCHEDIT1
 SUMMARYREPORT(Name,0)
 Option=$$OPTION("Delete which entry? ",0,+$o(^|"^^"_$zu(12)|%SYS("GBLOCKCOPY",Name,""),-1))
 Option=0 BATCHEDIT
. . . . . . . .

HTH,

Robert Cemper · Jul 18, 2019 go to post

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. 

Robert Cemper · Jul 17, 2019 go to post

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