Robert Cemper · Jan 13, 2020 go to post

I see !
And can confirm that this is by design (and ANSI definition) built like a routine call by value.
And you have no chance for a pass by reference.  [ somehow   for i=1:1:.x ]
Funny enough I remember a related discussion when I implemented that piece of  M_interpreter  almost 40 yrs ago (pre Caché in MACRO32)
And the result was: If someone wants a dynamic ended loop he should use the unlimited variant and QUIT it when done.
(WHILE was unknown in the standard definition of '78) 

And for reason of backward compatibility, no one ever tried to change it.

Robert Cemper · Jan 13, 2020 go to post

I probably miss the point of your example.

BUT, the equivalent of your WHILE loop is this FOR loop:

set x=5 for i=1:1 write "i: ",i,", x: ",x,! if $i(x) quit:i>x

and it's immedeatly evident that this loop is endless by design similar as the while construct
 

Robert Cemper · Jan 12, 2020 go to post

Hi Dmitriy,

$ZF(-1) has no chance for a timeout it is strictly synchronous
So $ZF(-2) and Looping for a result might be a workaround
$ZF(-100,"/ASYNC", ...) may do the same. See details

Both need to run the external routine in a script that documents its completion in some file and you check it.

A different approach could be a Command Pipe (CPIPE) where you read the result with a timed READ.
It's basically the same

Robert Cemper · Jan 10, 2020 go to post

Actually most queries run on a single server.

With Sharding It might be much more important to see possible effects of distributed queries.
Especially in the starting phase when optimizing distributions is still somehow like tapping in the fog.
 

Robert Cemper · Jan 9, 2020 go to post

Hi Ben,

I have query plans tonight. but not in SQL  ;-)

seriously. 90% from SMP, the rest from SQLshell.
Alternate Query never crossed my path.

Robert Cemper · Jan 7, 2020 go to post

Hi Scott!

Happy new year! 
You are right ZEN is out but CSP is not.
With ZEN you might have implemented inline editing.
But is rather simpler to achieve an acceptable result  (except coloring) if you separate editing from table view.
The generated page has a SEARCH page that should be easy to configure. <CSP:SEARCH>
And if you force the generated page to start with the search page with maxrows=25 you might cover the needs I understood.

This were my changes:
<head>
<title>Cache Server Page - Sample.Person (SAMPLES)</title>
</head>
<!-- start with search page -->
<body onload='form_search()'>
<h1 align='center'>

and at end:
</form>
</body>

This is the extended CSP:SEARCH tag:

<!-- use csp:search tag to create a javascript function to invoke a search page -->
<csp:search name='form_search' 
 classname='Sample.Person' 
 where='ID,Name,DOB,Home.City,Home.State' options='clearbtn,sortbox' 
 PREDICATES="%startswith,=,contains" MAXROWS=25
 SELECT = 'ID,Name,DOB,Home.City,Home.State,Home.Street,Home.Zip' 
 >

I did the example in namespace SAMPLES

Robert Cemper · Jan 5, 2020 go to post

Hi Jeff,

After some playing around it was clear that any error in a procedures ends up with <-149>:<SQL Function encountered an error>
as you found out yourself.

To have <-400> the error must happen at the top level of your SQL statement .
Using your initial SqlProc
If you add an argument to your SELECT ....., 1/HL7.Message.Get(pid) as found ....

you get a useless 1/tMsg.Read(tMsg.Size) value

but you get 

[SQLCODE: <-400>:<Fatal error occurred>]
[%msg: <Unexpected error occurred: <DIVIDE>%0AmBuncommitted+4^%sqlcq.USER.cls34.1>]

enforced by a 0 return value.

That's just half of the request and I see no way  to influence %msg variable
So you can enforce a STOP of your query. 

Robert Cemper · Jan 4, 2020 go to post

Sorry,
I had in mind to set SQLCODE = -400  , %msg, . .. or similar Embedded SQL variables directly

if it is just for SQLCODE instead of ProcedureBlock = 0 you may use

ClassMethod Get(pId As %String) As %String [ SqlName = GetMsg, SqlProc , PublicList = SQLCODE   ]
 

% variables are public anyhow
details on PublicList

Robert Cemper · Jan 4, 2020 go to post

Did you try to use

ClassMethod Get(pId As %String) As %String [ SqlName = GetMsg, SqlProc ,  ProcedureBlock = 0  ]

to get SQLCODE and related variables out fo your Class Context ?

Sorry, I had no chance to try it self.

Robert Cemper · Jan 4, 2020 go to post

I think it's both

#1 missing a lot of important countries

#2 wrong (or very aged)  since FRANCE: 20  would mean to have 1 employee by customer . This simply can't match.
I think a look at the WRC registry might give some feeling on the dimensions.  (without disclosing details)  

For my case 5 yrs back picking out 1 of my partners which had >30 installations at 30 companies.
Could be they count "Intersystems Only"  -  but that's not stated nor does it make sense.

walking through their web pages you see fast who is their preferred product supplier. no need to mention

Robert Cemper · Jan 4, 2020 go to post

Attention!

The list of companies from enlyft.com is totally wrong.
Even if you just look at Electronic Health Record  you miss important countries like whole Scandinavia, Italy, Germany, China, ...
and beyond that whole middle and eastern Europe and especially Russia. Where is Japan ?
Just as a signal how massively wrong these figures are:
My small Austria has more companies using Intersystems products than this 26 counting for India.

I'd suggest you contact Intesystems Marketing for REAL figures.
Your source is just faked information.

Robert Cemper · Jan 2, 2020 go to post

Thanks for the confirmation.
By this trick, (applied on coordinates)  I could beat Oracle Spacial by magnitudes

Robert Cemper · Dec 30, 2019 go to post

the issue is here:

Method RtnReceive(RtnName As %String, 
  RtnLines As %ListOfDataTypes(ELEMENTTYPE="%String",
  XMLITEMNAME="RtnLinesItem",XMLNAME="RtnLines")) As %String [ Final, ProcedureBlock = 1, SoapBindingStyle = document, SoapBodyUse = literal, WebMethod ]
{

use instead ELEMENTTYPE="%VarString",

 %VarString inherits from %String all except pre-define MAXLEN=50

Robert Cemper · Dec 26, 2019 go to post

A few recommendations to improve performance:

#1) %TimeStamp  is a nice thing for display tough rather inefficient for indexing as it is mostly close to a unique index.
If you just check for Date as you describe you better use an index on a calculate property of type %Date
instead of a string, your date values in index are just integers !!! 
that makes your index slim and fast.

#2)
check for = is the easiest one, therefore, the fastest
check for > is the slowest as you have no stop condition
between is somewhat better as you have to check > and <  but you have a start / stop delimited range.

And integer compare is by dimensions faster than any string compares with any available processor chip.
And you do lots of them!

in reality, better check the number of Global references and lines you execute.
That's the truth.  Costs are good guesswork based on generic parameters out of tune table but rather for the dimension.

Robert Cemper · Dec 25, 2019 go to post

SUPER !  yes

less scrolling = easier to foloww the contents.

A real Xmas gift!  angel

Congrats & best wishes

Robert Cemper · Dec 22, 2019 go to post

@Kenneth.Poindexter8571   this is correct
though the result might be disappointing.
 
See: >ping www.intersystems.com

Antwort von 172.227.166.122: Bytes=32 Zeit=22ms TTL=55

But:

USER>w $system.INetInfo.AddrToHostName($C(172,227,166,122))
a172-227-166-122.deploy.static.akamaitechnologies.com
USER>

 

Robert Cemper · Dec 20, 2019 go to post

map  your MS SQL Table to a class using SQL gateway

in Studio create a new CSP page

<html>
<head> <!-- Put your page Title here -->
<title> Cache Server Page </title> </head> <body>
<!-- Put your page code here -->
My page body
</body>
</html>

use Tool / Templates  / WebForm Assistant
select your Class and the Properties you need
compile  it
use it

Robert Cemper · Dec 12, 2019 go to post

Great to see the subject coming up.

Especially as I had a very personal relationship to it starting with version -2 (SpeedMiner??)
or so before it was named DeepSee 1.

yes  yes  yes​​​​​​​  yes​​​​​​​  ​​​​​​yes​​​​​​​  

Robert Cemper · Dec 2, 2019 go to post

Sorry. My DOCKER is a Windows version. Iris is Ubuntu.
So it is UBUNTU inside Windows.  

Robert Cemper · Dec 1, 2019 go to post

just tried your line:

My docker is slightly older. 

Checked it on Ubuntu server

rcemper@TEST:~$ sudo bash
[sudo] password for rcemper:
root@TEST:~#

root@TEST:~# docker --version
#Docker version 19.03.4, build 9013bf583a

And this one runs on WIN10
>docker --version
Docker version 19.03.4, build 9013bf5

Same result for both of them:

>docker container run -it -p 51773:51773 -p 52773:52773 -p 5001:5001 -p 5000:5000 --name rcc2 --rm store/intersystems/iris-community:2019.3.0.309.0
[WARNING] No init process detected!  This container may accumulate zombie processes if run for a long time.  Consider using "docker create --init ..." or equivalent.
[INFO] Starting InterSystems IRIS instance IRIS...
[INFO] This copy of InterSystems IRIS has been licensed for use exclusively by:
InterSystems IRIS Community
Copyright (c) 1986-2019 by InterSystems Corporation
Any other use is a violation of your license agreement
Starting IRIS

12/01/19-22:24:43:883 (397) 0 [Generic.Event] Automatically configuring buffers
12/01/19-22:24:43:959 (397) 0 [Generic.Event] Allocated 421MB shared memory: 249MB global buffers, 35MB routine buffers
12/01/19-22:24:43:961 (397) 0 [Crypto.IntelSandyBridgeAESNI] Intel Sandy Bridge AES-NI instructions detected.
12/01/19-22:24:43:975 (397) 0 [WriteDaemon.UsingWIJFile] Using WIJ file: /usr/irissys/mgr/IRIS.WIJ
12/01/19-22:24:43:976 (397) 0 [WriteDaemon.CreatingNewWIJ] Creating a new WIJ file
12/01/19-22:24:45:445 (397) 0 [WriteDaemon.CreatedNewWIJ] New WIJ file created
- - - - 

Robert Cemper · Dec 1, 2019 go to post

Hi  

We used this @ german symposium: 

>docker images
REPOSITORY                          TAG                 IMAGE ID            CREATED             SIZE
store/intersystems/iris-community   2019.3.0.309.0      ccc1f07e75b6        2 months ago        1.33GB

>docker run -it -p 51773:51773 -p 52773:52773 -p 5001:5001 -p 5000:5000 -v c:\DockerData\:/data --name rcc2 --rm ccc1f07e75b6
[WARNING] No init process detected!  This container may accumulate zombie processes if run for a long time.  Consider using "docker create --init ..." or equivalent.
[INFO] Starting InterSystems IRIS instance IRIS...
[INFO] This copy of InterSystems IRIS has been licensed for use exclusively by:
InterSystems IRIS Community
Copyright (c) 1986-2019 by InterSystems Corporation
Any other use is a violation of your license agreement
Starting IRIS

12/01/19-19:13:57:734 (397) 0 [Generic.Event] Automatically configuring buffers
12/01/19-19:13:57:808 (397) 0 [Generic.Event] Allocated 421MB shared memory: 249MB global buffers, 35MB routine buffers
12/01/19-19:13:57:810 (397) 0 [Crypto.IntelSandyBridgeAESNI] Intel Sandy Bridge AES-NI instructions detected.
12/01/19-19:13:57:825 (397) 0 [WriteDaemon.UsingWIJFile] Using WIJ file: /usr/irissys/mgr/IRIS.WIJ
12/01/19-19:13:57:825 (397) 0 [WriteDaemon.CreatingNewWIJ] Creating a new WIJ file
12/01/19-19:13:58:490 (397) 0 [WriteDaemon.CreatedNewWIJ] New WIJ file created
12/01/19-19:13:58:493 (397) 0 [Generic.Event]
Startup of InterSystems IRIS [IRIS for UNIX (Ubuntu Server LTS for x86-64 Containers) 2019.3 (Build 309U) Wed Sep 11 2019 16:20:03 EDT]
        in /usr/irissys/bin/
        with mgr: /usr/irissys/mgr
        with wij: /usr/irissys/mgr/IRIS.WIJ
        from: /usr/irissys/mgr/
  OS=[Linux], version=[#1 SMP Tue Jul 2 22:58:16 UTC 2019], release=[4.9.184-linuxkit], machine=[x86_64]
  nodename=[e3f43e3bfd15].
  numasyncwijbuf: 0, swdwrtmax: 0, wijdirectio: off, synctype: 3
  System Initialized.
12/01/19-19:13:58:504 (398) 0 [WriteDaemon.Started] Write daemon started.
12/01/19-19:13:59:795 (409) 0 [Database.MountedRW] Mounted database /usr/irissys/mgr/ (SFN

and it works as expected .
  But I used no durable feature !!  

 

Robert Cemper · Dec 1, 2019 go to post

Thanks for the clarification. 
It's a rare chance I might be up at that early time smiley 
and if my body is it doesn't mean my brain is too.

Robert Cemper · Dec 1, 2019 go to post

Could someone explain to a newcomer what the time is telling me  ?

Any local time  (lokes like EST) ?  or some total ???

     --------Part 1--------   --------Part 2--------
Day       Time   Rank  Score       Time   Rank  Score
  1   11:37:18  15816      0   11:50:08  14212      0