Robert Cemper · Oct 13, 2021 go to post

Good Morning,
Now the case seems rather clear to me:

  • in a fresh image of IRIS, the namespace USER is preconfigured for Interoperability/Ensemble and your Copy from should be USER
  • differently in a fresh installed HS image, it is the namespace HSSYS that is preconfigured for Interoperability/Ensemble and your Copy from should be HSSYS
  • namespace %SYS was and is  NEVER configured to work  in Interoperability/Ensemble
  • similar is IRISSYS using as your working database a bad misconfiguration with unpredictable conflicts and consequences  
Robert Cemper · Oct 12, 2021 go to post

There's a mismatch. You see the code but no data at runtime.
Project is always just a subset of Namespace
 

Robert Cemper · Oct 12, 2021 go to post

you seem to miss this mapping by failed installation

[Map.your namespace>
Global_Ens.SecondaryData*=ENSSECONDARY
Global_EnsDICOM.Dictionary=ENSLIB
Global_EnsEDI.Description=ENS
Global_EnsEDI.Description("X","X12")=ENSLIB
Global_EnsEDI.Schema=ENS
Global_EnsEDI.Schema("HIPAA_4010")=ENSLIB
Global_EnsEDI.Schema("HIPAA_5010")=ENSLIB
Global_EnsEDI.Schema("ISC_00401")=ENSLIB
Global_EnsEDI.Schema("ISC_00405")=ENSLIB
Global_EnsEDI.X12.Description=ENS
Global_EnsEDI.X12.Description("HIPAA_4010")=ENSLIB
Global_EnsEDI.X12.Description("HIPAA_5010")=ENSLIB
Global_EnsEDI.X12.Schema=ENS
Global_EnsEDI.X12.Schema("HIPAA_4010")=ENSLIB
Global_EnsEDI.X12.Schema("HIPAA_5010")=ENSLIB
Global_IRIS.Msg=ENS
Global_IRIS.Msg("Arial,Tahoma,Verdana")=ENSLIB
Global_IRIS.Msg("Confirm")=ENSLIB
Global_IRIS.Msg("EDIDocumentView")=ENSLIB
Global_IRIS.Msg("Ens")=ENSLIB
Global_IRIS.Msg("EnsAlert")=ENSLIB
Global_IRIS.Msg("EnsBPL")=ENSLIB
Global_IRIS.Msg("EnsColumns")=ENSLIB
Global_IRIS.Msg("EnsDICOM")=ENSLIB
Global_IRIS.Msg("EnsEDI")=ENSLIB
Global_IRIS.Msg("EnsEDIEDIFACT")=ENSLIB
Global_IRIS.Msg("EnsEDIHL7")=ENSLIB
Global_IRIS.Msg("EnsEDISEF")=ENSLIB
Global_IRIS.Msg("EnsEDIX12")=ENSLIB
Global_IRIS.Msg("EnsEnt")=ENSLIB
Global_IRIS.Msg("EnsLDAP")=ENSLIB
Global_IRIS.Msg("EnsMQTT")=ENSLIB
Global_IRIS.Msg("EnsPushNotifications")=ENSLIB
Global_IRIS.Msg("EnsRecordMap")=ENSLIB
Global_IRIS.Msg("EnsSAP")=ENSLIB
Global_IRIS.Msg("EnsSR")=ENSLIB
Global_IRIS.Msg("EnsSearchTable")=ENSLIB
Global_IRIS.Msg("EnsWf")=ENSLIB
Global_IRIS.Msg("EnsXPATH")=ENSLIB
Global_IRIS.Msg("EnsebXML")=ENSLIB
Global_IRIS.Msg("Ensemble")=ENSLIB
Global_IRIS.Msg("ITK")=ENSLIB
Global_IRIS.Msg("RuleEditor")=ENSLIB
Global_IRIS.Msg("Workflow")=ENSLIB
Global_IRIS.Msg("tahoma,verdana")=ENSLIB
Global_IRIS.MsgNames=ENS
Global_IRIS.MsgNames("Arial,Tahoma,Verdana")=ENSLIB
Global_IRIS.MsgNames("Confirm")=ENSLIB
Global_IRIS.MsgNames("EDIDocumentView")=ENSLIB
Global_IRIS.MsgNames("Ens")=ENSLIB
Global_IRIS.MsgNames("EnsAlert")=ENSLIB
Global_IRIS.MsgNames("EnsBPL")=ENSLIB
Global_IRIS.MsgNames("EnsColumns")=ENSLIB
Global_IRIS.MsgNames("EnsDICOM")=ENSLIB
Global_IRIS.MsgNames("EnsEDI")=ENSLIB
Global_IRIS.MsgNames("EnsEDIEDIFACT")=ENSLIB
Global_IRIS.MsgNames("EnsEDIHL7")=ENSLIB
Global_IRIS.MsgNames("EnsEDISEF")=ENSLIB
Global_IRIS.MsgNames("EnsEDIX12")=ENSLIB
Global_IRIS.MsgNames("EnsEnt")=ENSLIB
Global_IRIS.MsgNames("EnsLDAP")=ENSLIB
Global_IRIS.MsgNames("EnsMQTT")=ENSLIB
Global_IRIS.MsgNames("EnsPushNotifications")=ENSLIB
Global_IRIS.MsgNames("EnsRecordMap")=ENSLIB
Global_IRIS.MsgNames("EnsSAP")=ENSLIB
Global_IRIS.MsgNames("EnsSR")=ENSLIB
Global_IRIS.MsgNames("EnsSearchTable")=ENSLIB
Global_IRIS.MsgNames("EnsWf")=ENSLIB
Global_IRIS.MsgNames("EnsXPATH")=ENSLIB
Global_IRIS.MsgNames("EnsebXML")=ENSLIB
Global_IRIS.MsgNames("Ensemble")=ENSLIB
Global_IRIS.MsgNames("ITK")=ENSLIB
Global_IRIS.MsgNames("RuleEditor")=ENSLIB
Global_IRIS.MsgNames("Workflow")=ENSLIB
Global_IRIS.MsgNames("tahoma,verdana")=ENSLIB
Global_IRIS.Temp.EnsHostTotals=IRISTEMP
Global_IRIS.Temp.EnsPortal*=IRISTEMP
Global_IRIS.Temp.EnsPublic*=IRISTEMP
Global_IRIS.Temp.Ens*=ENSENSTEMP
Routine_Ens*=ENSLIB
Package_CSPX.Dashboard=ENSLIB
Package_Ens=ENSLIB
Package_EnsLib=ENSLIB
Package_EnsPortal=ENSLIB

and eventually also these databases

ENSENSTEMP=C:\InterSystems\IRIS\mgr\ENS\ensenstemp\
ENSLIB=C:\InterSystems\IRIS\mgr\enslib\
ENSSECONDARY=C:\InterSystems\IRIS\mgr\ENS\enssecondary\
Robert Cemper · Oct 12, 2021 go to post

What do you mean by "my namespace extends %sys"
This makes no sense to me.
Did you setup the namespace yourself ?

Robert Cemper · Oct 12, 2021 go to post

which means table does not exist.
SO your namespace is not setup for Interoperability aka Ensemble

as you use Studio jus look for some Ens* classes


if you see nothing of them,
then the setup of your namespace is just wrong

You have to create it again or change your configeratiion manually.  

Robert Cemper · Oct 12, 2021 go to post

I think this should work if your namespace is enabled for Ensemble / Interoperability

Check this in SMP:
SELECT count(IDFROM Ens.MessageHeader

ClassMethod FetchMsgCount() As %Integer [ PublicList = msgCount,SQLCODE ] 
{
    set msgCount=-1
&sql(SELECT count(IDINTO :msgCount FROM Ens.MessageHeader)
If SQLCODE=0 Quit msgCount
Quit SQLCODE
}

or just simpler


ClassMethod FetchMsgCount() As %Integer  [ ProcedureBlock = 0 ]
{
    set msgCount=-1
&sql(SELECT count(IDINTO :msgCount FROM Ens.MessageHeader)
If SQLCODE=0 Quit msgCount
Quit SQLCODE
}
 

Robert Cemper · Oct 12, 2021 go to post

The license-mechanic is a little bit complicated:

  • users are identified by  username@127.0.0.1  (as mentioned already)
  • every new process consumes a license slot over its lifetime
  • each user gets a set of license slots  (typically 25)
  • once this limit (25) is exceeded ALL 25 slots are converted to normal (non-licenses)

As a consequence, a request for license number 26 consumes 25 additional licenses for that user !!
And these licenses come back to in the license slot mode only if ALL processes of that user are terminated
So using a single user (e.g. from CSP) is rather risky in that relation

$system.License.Login()  may help you cross that limit.
from docs:

This function will relinquish a license if the session/process is already holding
one under a different identifier and it will obtain a new one on the behalf of the
user ID provided.
If the MAXCONNECTIONS connection limit per user is exceeded,
the usual transition to one-license-unit-per-connection
will apply to this user identifier.
   
Robert Cemper · Oct 7, 2021 go to post

From the main menu, in DC select members

select the member of interrest

and show all posts

Robert Cemper · Sep 27, 2021 go to post

Hi @Jeffrey Drumm . there are  2 options

#1)
From SMP > Explorer > Classes in %SYS set filter to %IO*.cls  and Documentation

#2)
In Studio in NS %SYS load the class and show Class Documentation
[CTRL + SHIFT +F1]
and see the code. I have seen more thrilling constructs before.

 

Robert Cemper · Sep 26, 2021 go to post

@Marlin Mixon 
 It is just not possible the way you tried. Because: (from class docs)

Move to this position in the stream. If this suceeds then return true, else return false. Note this implementation is not efficient because it searches from the start of the stream,

This means it does a Rewind() and a Read(position) 

• method Write(data As %RawString) as %Status

Appends the string data to the stream and advances the current stream position by the number of characters in data.

Note that a write operation immediately following a read or rewind will clear out the existing data in the stream.

Robert Cemper · Sep 24, 2021 go to post

%SYS>d ^SECURITY
  
1) User setup
2) Role setup
3) Service setup
4) Resource setup
5) Application setup
6) Auditing setup
8) SSL configuration setup
9) Mobile phone service provider setup
10) OpenAM Identity Services setup
11) Encryption key setup
12) System parameter setup
13) X509 User setup
14) KMIP server setup
15) Exit
 
Option? 1
 
1) Create user
2) Edit user
3) List users
4) Detailed list users
5) Delete user
6) Export users
7) Import users
8) Exit
 
Option?

Robert Cemper · Sep 21, 2021 go to post

so you can call the local  commandline ( session  or terminal) and run
your SELECT in SQL shell [  do $system.SQL.Shell() ]
or from SMP System->Explorer->SQL  to see if there is any content.
If there is some content you may try next to use variables from the global scope
for your  embeded SQL
instead of 
&sql(Select demoVersion into :DemoVersion from demointerface.DemoInstances where ID=:demoID)

try it with
&sql(Select demoVersion into :%DemoVersion from demointerface.DemoInstances where ID=:%demoID)

Robert Cemper · Sep 21, 2021 go to post

what do you mean by "local" ?
local session,  local instance,  local server ?
assuming "production" runs on a server 

Robert Cemper · Sep 16, 2021 go to post

Hi,

%ALL is best understood as a virtual NAMESPACE.
It is a mapping attribute that you add to your packages, classes, routine, globals to make them visible beyond the physical namespace that you can select in SMP.
To see its content in SMP select System > Configuration > Namespaces



 

Robert Cemper · Sep 15, 2021 go to post

definitely yes.
global store is a fast-changing DB with related mirror, journal, ECP, Sharding.
routine DB should change rarely and under special control.
may eventually have journal, but should not participate in ECP, Sharding, Mirror 

Robert Cemper · Sep 14, 2021 go to post

The VIEW as such could be understood as a complex SELECT which definition is stored in the system 
At the first time processing, all code for access is generated and cached in the system
and marked with a signature. this may take a few seconds.
In parallel, a significant amount of structural data are also cached
The next time you call it, the signature is calculated and the already cached code is executed. 
You save time for code generation and compilation.
If this happens shortly after the first call you take additional advantage of the cached structural data.
How much and how long structural data are caches depends on the available buffer pool

Robert Cemper · Sep 14, 2021 go to post

This proves my observation that some %-classes are like American cars:

Not for speed, just for comfort!

Robert Cemper · Sep 14, 2021 go to post

Hi @Jack Huser,
I assume you would agree it is fair to compare apples to apples
but not horse coaches to formula-1 cars.

Being proud that I never lost a benchmark by speed I rewrote your code
that is nice to read and maintain but not very efficient, going for something
more speedy to show the limits and then checked it against your class.
My test file has only 47MB containing 181566 lines.

DEMO>write ##class(JUH.Test).ReadFile(file)
execution: 214.931024
1
DEMO>write ##class(JUH.Test).ReadQuick(file)
execution: .753696
lines: 181566
1
DEMO>write .753696/214.931024*100_" %"
.3506687801385062028 %

I think 0.35% is quite an eye catcher.

And his is the class:

 ClassMethod ReadQuick(strINReadFile As %String = "") As %Status
 {
  open strINReadFile::1 
  else  write "Missing File",! quit '$$$OK 
  set eof=##class(%SYSTEM.Process).SetZEOF(1)
  use strINReadFile
  set time1=$zh 
  for line=0:1 {
    read strBuffer if $zeof set diff=$zh-time1 quit
    // do something with strBuffer
  }
  close strINReadFile
  do ##class(%SYSTEM.Process).SetZEOF(eof)
  write !,"execution: "_diff,!,"lines: ",line,!
  quit $$$OK
 }

I just couldn't resist my nature.

Robert Cemper · Sep 13, 2021 go to post

run a community container withZPM loaded e.g. intersystemsdc/iris-community:2020.4.0.547.0-zpm
and then from irisession
zpm "install webterminal"  
this should do all you need

Robert Cemper · Sep 13, 2021 go to post

For this query, I would suggest to define this index:

Index iFilter on (KundenNr,ErfassungsartBez,DatumAuftrag) ;

The sequence of KundenNr,ErfassungsartBez,DatumAuftrag should by increasing selectivity
As found in Tune Table output (SMP > SQL > Actions > TuneTable)

Robert Cemper · Sep 13, 2021 go to post

I did further investigations on 'broken' input files and placed a related issue
https://github.com/MakarovS96/cache-tort-git/issues/8
It happened a little bit by accident but I found this a possible realistic scenario that explains
why the problem occurs every now and then.  You may argue this is bad handling by user.
Accepted. But not unlikely.
I found this situation:

  • I have a project. with several packages and classes
  • I deleted a class BUT the PACKAGE was not saved and didn't reflect the change
  • From ClassMethod ExportProject(project ,1) I get this strange XML for the deleted class c:\temp\TEST\dc\MyCompany\EmployeRegister1.cls.xml <?xml version="1.0" encoding="UTF-8"?> <Export generator="IRIS" version="26"> </Export>
  • now I need a GIT expert to analyze what happens with this incomplete input.
  • my assumption: according to the file name there is an empty entry of type CLS named /dc/MyCompany/EmployeRegister1.cls.xml or similar
  • when ist is restored it may cause the described problem togehter with the reported bug in $system.OBJ.Load() 
Robert Cemper · Sep 12, 2021 go to post

Finally, the docker image now builds OK and contains all required classes & all globals.
( + also the bug in dc.script.Genre.cls was fixed) 
Connection to local PowerBi now works and shows the expected images.
Thanks for fixing it.
I was somewhat surprised that IRIS Analytics was not required at all since there
was no Cube nor Pivot nor Dashboard. I built it myself just using dc.dc.bi.PopSongs.
OK. PowerBI graphics look better.
But here is not the place to comment on ZEN graphics.