Robert Cemper · Sep 17, 2018 go to post

eXecute command is sensible to variable scoping
in addition control of allowed operates is required.
this small method gives you an easy to maintain code.

ClassMethod Operate(var1 = ""op As %String = "",var2 = "") As %Boolean {
 goto $case(op
         ,"<":lt
         ,">":gt
         ,"=":eq
         ,"<>":ne
         ,:fail
         )
fail quit 0
lt   quit var1 < var2
gt   quit var1 > var2
eq   quit var1 = var2
ne   quit (var1 '= var2)
}

.

and you are free to use any naming of your operator you allow ( & , $ , @, GOOFY, DAISY, DUFFY, DONALD, .. )

Robert Cemper · Sep 17, 2018 go to post

Assuming you create your Output by WRITE variable
the most simple solution would be to change it to   WRITE """"_variable_""""

if your variable can contain quotes that need to be escaped WRITE """"_$REPLACE(variable,"""","""""")_""""
may fit your needs.

More sophisticated you may hide the quoting in some macro definition.

Robert Cemper · Aug 29, 2018 go to post

That's it,  Alex is right

USER>set list=$lb(7,8 ,9)
USER>zzdump list
 
0000: 03 04 07 03 04 08 03 04 09                              .........
USER>set $li(list,2,2)=$lb()
USER>zzdump list
 
0000: 03 04 07 01 03 04 09                                    .......
USER>zw list
list=$lb(7,,9)
Robert Cemper · Aug 29, 2018 go to post

I recently had a problem with a provider not allowing PASV anymore. without notice

Just a guess
 

Robert Cemper · Aug 28, 2018 go to post
set list = $lb("stri,ng", $c(0), 2)
   ,p=0
for  set p=$LISTFIND(list,$C(0),p) quit:'p  set $LIST(list,p)=""
Robert Cemper · Aug 28, 2018 go to post

The path in  JSINCLUDES and  CSSINCLUDES looks somewhat suspicious to me.

you use a path relative to the location of your page.
verify (eg. with Chrome) that your libraries really get loaded

Robert Cemper · Aug 28, 2018 go to post

you mix up 2 variants of indirection

W @B
S @("C="_B)

These both are ARGUMENT indirections, where the arguments of WRITE or SET are replaced.

But

S C=@B

is a NAME indirection where the name of a variable or global is expected.
$P(A,S,2) is definitely no a variable or global name.

Docs on Indirection is quite verbose and shows the limits. 

Most important: this is a runtime feature and not a compile-time feature!

Robert Cemper · Aug 27, 2018 go to post

You can achieve this using TRANSACTIONS in combination with ISOLATION LEVELS

BUT: as with the  LOCK in COS you depend on the other players to take notice of your isolation.  
If they don't care you are lost since this is no absolute locking.
COS has the option to lock your record ahead - but you depend on the other participants.

An other option is to use ROWVERSION  to protect your record. (optimistic locking)
If someone has changed your record under cover you get alerted on the fact.

Robert Cemper · Aug 27, 2018 go to post

instead of eXecute you may use Indirection

set @("mylist="_result)

.

It's a matter of taste  :
take care for ProcedureBlock = 0 ;  as for eXecute ; just in case 

Robert Cemper · Aug 27, 2018 go to post

Only out of curiosity:

What do you get back if you just do "return list"     without toString() ?
Whatever structure CacheListBuilder may have 

Robert Cemper · Aug 19, 2018 go to post

You may create your private row count by group. 

Class DC.any [ Abstract ]
{
ClassMethod MyVid(group = "") As %String [ SqlName = MyVid, SqlProc ]
{
 if group="" kill %myVid quit 0  ;;initialize it
  quit $I(%myVid(group))
}

 .

how to use it:

SELECT DC.MyVid(company) RowNumber, Company,Company->Name, Name
FROM Sample.Employee where DC.MyVid()=0 /* static condition for init */
order by 2

 .

looks like this:

RowNumber

Company

Name

Name

1

1

O' KwalLateral Group Ltd.

Moon,Mary Q.

2

1

O' KwalLateral Group Ltd.

Ximines,Alice Z.

3

1

O' KwalLateral Group Ltd.

Malynko,Greta H.

4

1

O' KwalLateral Group Ltd.

Lubbar,Emily Q.

1

2

InterPlex Holdings Inc.

Tesla,Kenny W.

2

2

InterPlex Holdings Inc.

Jones,Valery N.

3

2

InterPlex Holdings Inc.

Baker,Samantha D.

1

3

GlobaSys LLC.

Quixote,Marvin C.

2

3

GlobaSys LLC.

Xerxes,Violet Y.

3

3

GlobaSys LLC.

Adams,Kim W.

4

3

GlobaSys LLC.

Ubertini,Roberta N.

5

3

GlobaSys LLC.

Jackson,Buzz V.

6

3

GlobaSys LLC.

Clinton,Keith C.

7

3

GlobaSys LLC.

Isaksen,Juanita T.

8

3

GlobaSys LLC.

Solomon,Imelda Z.

1

4

SynerMatix Associates

Humby,Olga A.

2

4

SynerMatix Associates

Orwell,Maureen R.

3

4

SynerMatix Associates

O'Donnell,Ed Q.

4

4

SynerMatix Associates

Orlin,Mary D.

5

4

SynerMatix Associates

Vanzetti,Pam V.

6

4

SynerMatix Associates

Noodleman,Chris O.

Robert Cemper · Aug 8, 2018 go to post

Thanks Ben,

that's excellent news. Checkpointing is a feature I was missing already in Caché.
I see no urgency in timing yet as we are still a starting phase.    

Robert Cemper · Aug 6, 2018 go to post

- check available disks space for CACHETEMP  (initial size)
- check access rights of the account starting Caché

Robert Cemper · Aug 3, 2018 go to post

|| is the concatenation operator in SQL

1||1 results in 11 as you have seen

'1||1'   in single quotes should do it

Robert Cemper · Aug 2, 2018 go to post

for cleaning up:

/// to get rid of old versions
/// select OBJ.DSTIME_DelVersion('Table',Version)
/// 
ClassMethod DelVersion(Table As %String = " "Version As %Integer = 0) As %Integer [ SqlProc ]
{
 Quit:'$l(Table) '$$$OK
 Kill ^OBJ.DSTIME(Table,+Version)
 Quit $$$OK
}

 
Robert Cemper · Aug 2, 2018 go to post

All I know about python is  "Monty Python" smiley

OK.

The table you want to control needs to get a parameter   Parameter DSTIME = "AUTO";  and a recompile

Then you can use this class to trace  changes, new, delete

/// Handle DSTIME using SQL
/// 
select * from OBJ.DSTIME where version = lastversion
/// to show all
Class OBJ.DSTIME Extends %Persistent [ Final, SqlRowIdPrivate {
Index idx On (Table, Version, RowID) [ IdKey ];
Property Version As %Integer [ ReadOnly, SqlColumnNumber = 2 ];
Property Table As %String [ ReadOnly, SqlColumnNumber = 3 ];
Property RowID As %String [ ReadOnly, SqlColumnNumber = 4 ];
Property Signal As %Integer(DISPLAYLIST = ",Modified,New,Deleted", VALUELIST = ",0,1,2")
   [
Calculated, , SqlComputedSqlColumnNumber = 5,
     SqlComputeCode = { set {*}=^OBJ.DSTIME({Table},{Version},{RowID})}];
Property LastVersion As %Integer [ Calculated, SqlComputed, SqlColumnNumber = 6,
   
SqlComputeCode = { set {*}=+$G(^OBJ.DSTIME) } ];

/// to get actual last version and switch to new version
/// select top 1 LastVersion,OBJ.DSTIME_NewVersion(LastVersion) from OBJ.DSTIME
/// 
ClassMethod NewVersion(anycolumn As %String) As %Integer [ SqlProc ]
 Quit $I(^OBJ.DSTIME) }
Storage Default {
<DataLocation>^OBJ.DSTIME</DataLocation>
<IdLocation>^OBJ.DSTIMED</IdLocation>
<IndexLocation>^OBJ.DSTIMEI</IndexLocation>
<StreamLocation>^OBJ.DSTIMES</StreamLocation>
<Type>%Library.CacheStorage</Type>
}

 

 so get your actual changes

select * from OBJ.DSTIME where version = lastversion

and switch to next version by 

select top 1 LastVersion,OBJ.DSTIME_NewVersion(LastVersion) from OBJ.DSTIME

.

But you have to have full access to Caché as you have to make the DB "talking"  to be able to "listen"

Robert Cemper · Aug 2, 2018 go to post

If you have just SQL access you may wrap a class around  ^OBJ.DSTIME to  select changes

Robert Cemper · Aug 2, 2018 go to post

You have to test on server  = "www.intersystem.com"  not just domain.
443 is ok

 
USER>s req=##class(%Net.HttpRequest).%New()
USER>s req.SSLConfiguration="SSL"
USER>set sc=req.Get("https://www.intersystems.com")
USER>zw sc
sc=1
USER>set data=req.HttpResponse.Data
USER>do data.OutpuToDevice()
>>>>    lot of content  <<<<
Robert Cemper · Aug 1, 2018 go to post

There are some mistakes.

#1 the links should be "HTTPS://www.intersystems.com" and you didn't set a ssl/tls config.

if you use 

Set sc=httprequest.Get("http://www.intersystems.com",2)
Do $system.OBJ.DisplayError(sc)

you get ERROR #6159: ===> SSL missing

#2 HttpResponse is an ObjectReferce not a Property

set res=httprequest.HttpResponse
ZW res
 
res=<OBJECT REFERENCE>[3@%
Net.HttpResponse]
+----------------- general information ---------------
|      oref value: 3
|      class name: %Net.HttpResponse
| reference count: 3
+----------------- attribute values ------------------
|    ContentBoundary = ""
|        ContentInfo = ""
|      ContentLength = 178
|        ContentType = "text/html"
|               Data = "4@%Stream.GlobalCharacter"   ;;; here is your reply
|Headers("CONNECTION") = "keep-alive"
|Headers("CONTENT-LENGTH") = 178
|Headers("CONTENT-TYPE") = "text/html"
|    Headers("DATE") = "Wed, 01 Aug 2018 15:25:05 GMT"
|Headers("LOCATION") = "https://www.intersystems.com/"
|  Headers("SERVER") = "nginx"
|  Headers("X-TYPE") = "default"
|        HttpVersion = "HTTP/1.1"
|       ReasonPhrase = "Moved Permanently"
|         StatusCode = 301
|         StatusLine = "HTTP/1.1 301 Moved Permanently"
+-----------------------------------------------------

The content is in a Stream!! 
So Write is totally inappropriate to show it. Instead:

do res.OutputToDevice()   ;;;or similar
HTTP/1.1 301 Moved Permanently
CONNECTION: keep-alive
CONTENT-LENGTH: 178
CONTENT-TYPE: text/
html
DATE: Wed, 01 Aug 2018 15:25:05 GMT
LOCATION: https://www.intersystems.com/
SERVER:
nginx
X-TYPE: default
 
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>
Robert Cemper · Jul 30, 2018 go to post

You may also want to check your message against the definition in WSDL. (e.g with XMLspy or similar)
there are enough SOAP services around that don't fit to the WSDL they publish.

Robert Cemper · Jul 30, 2018 go to post

Hi Thomas,

If you generate your webservice from a WSDL  you should check your classes
for correct hierarchical structure AND for properties flagged as required in WSDL.
Typical situation: 
an address is optional but inside the address, the street is required.  
This can cause the whole address to be interpreted as required.
You may either remove the required in properties or before generating the classes you edit the WSDL ( often easier).
 

Robert Cemper · Jul 15, 2018 go to post

Your Sales Rep or Sales Engineer should also be a trustworthy resource.
(probably not on Sunday morning / afternoon)

Robert Cemper · Jul 14, 2018 go to post

As by your concrete question

Caché

InterSystems Caché® is a high-performance database that powers transaction processing applications around the world. It is used for everything from mapping a billion stars in the Milky Way, to processing a billion equity trades in a day, to managing smart energy grids.

Ensemble

InterSystems Ensemble® is a seamless platform for rapid connectivity and the development of new connectable applications. Ensemble users typically complete projects twice as fast compared to previous generations of integration products.

InterSystems IRIS

InterSystems IRIS Data Platform™ sets a new level of performance for rapidly developing and deploying important applications. All of the needed tools and capabilities are provided in a reliable, unified platform spanning data management, interoperability, transaction processing, and analytics.

more

Robert Cemper · Jul 13, 2018 go to post

I'm not aware of a "customized" collation.
But this might be an appropriate workaround:

- for your property, you define an additional calculated property that results out of your  customized collation
- for this new calculated property,  you define COLLATION = EXACT to avoid default surprises (SQLUPPER !!!)

If you index it, you should get what you expected without impact to the rest of your table