You are totally right.
I tried to stick with the original questions. And I wouldn't formulate it that "traditional" way.
As you noticed there are more efficient and meaningful constructs possible.
- Log in to post comments
You are totally right.
I tried to stick with the original questions. And I wouldn't formulate it that "traditional" way.
As you noticed there are more efficient and meaningful constructs possible.
Try "" instead of null which would be a variable named null
do $$$AssertEquals(myObj, "", "myObj is null")
or
set null="" do $$$AssertEquals(myObj, null, "myObj is null")
or to cover undefined as well
do $$$AssertEquals($GET(myObj), "", "myObj is null")
quicker again
My sample took somewhat longer to prepare then Edward's
and Gerd's
#1) to evaluate SQL statements use MgmtPortal/ Explorer/SQL and check the generated query plan.
#2) if you don't use special attributes to SELECT clause or sub-queries all SQL statements are strictly worked from left to right.
your first statement is ok for SQL your 2nd is just a fragment that I interpreted as to be a sub-query
Summary: they are not identical.
Now the example transformed for namespace SAMPLES to have 3 tables as A, B, and C:
Row count: 100
Query Plan:
transformed to sub-queries:
it is obviously identic ! just more expressive.
Row count: 100
Query Plan:
the next LEFT_JOIN(A,INNER_JOIN(B.C)) requires immediate transformation
Row count: 237 (!!!!)
Query Plan:
So both variants are possible though the result is different
HTH,
As alternative to copy you can also map ^EnsPortal.SavedSearch* in your secondary namespace to use it in parallel.
Telnet port 23 is typically blocked on Unix/Linux Servers.
I'd suggest to use some other terminal program with support of SSH to log in (eg. Putty www.putty.org)
But be aware on UNIX/LINUX you log in to a shell and have to start csession for "Terminal like" access
the key difference is that you can pass the classname by a variable.
So you are prepared to get the classname passed by some other method.
In your example with a constant string"circle"you miss the key advantage and It's of o added value.
BTW. Correct is $classmethod("circle.radius","%New")
http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY…
For testing with Terminal I typically use PuTTY. http://www.putty.org/
There I can have multiple terminals with separated Sessions/$JOB in parallel without problem.(pls. don't ask how )
Terminal driver changes to a free set of ports ( 51133|10088) as you see by $IO
so it's no problem to have multiple terminal sessions connected
USER>w $io
|TNT|127.0.0.1:51133|10088
valid observation.
is Enable %Service_Telnet set ?
in the Management Portal (http:///csp/sys/sec/%25CSP.UI.Portal.Services.zen)
My Caché runs on Win .(I'm not sure if this works also for Caché on Unix )
It does NOT work for Unix:
| %Service_Telnet | Yes | Yes | Unauthenticated | Unrestricted | Controls Telnet sessions on a Windows server |
So on UNIX you go to bash and have to start via csession....
so what you are looking for is something similar to XML IGNORENULL = 1
short time ago I ended up with export to XML and then convert XML to JSON.
Not so impressive but better than chasing unwanted "".
Right: if you don't establish TELNET connection it's just bash or MS-DOS depending on your local OS.
Also for local localhost access !
so from Help:
Terminal View.Setup Connection

And you get your Caché Terminal

HTH
Funny to meet amCharts again as I presented it first to customers as alternative to ZEN graphics
around 2011/12 with Caché 2011.1![]()
¿ did the answers solve the issue ?
and keep quiet when it installs.
this is not Caché and it takes it's time ![]()
(I just spent 25 min for an Update/Upgrade)
It is. I have used it some time ago.
You need a suitable plug in and connect to port 23 of your server
(provided it is not blocked by Win* firewall.
plugin from the following update repository: http://download.eclipse.org/tm/terminal/marketplace/.
Help > Install New Software from the main menu.Because it's so easy I've added a solution for those readers that don't refuse to work with Caché Objects & Classes .
Class Definition
Simple display method
Extended test data
Result
what's wrong with Caché Objects and Classes ?
I remember, you had a similar fear some time ago ![]()
Class not found + Win7 makes me think you should check your System Variable CLASSPATH ?
just a guess.
This is one of my personal reasons to use PuTTY or WebTerminal or anything else than TERMINAL.
Kevin,
if you call a ClassMethod() it will return whatever the type of return value is like.
some variants:
- your Classmethod generates the CSV file as you do and the return value is the filename
ClassMethod Kevin1() as %String [SqlProc]
{
....... generate CVS File
quit Filename
}
- instead of a file you generate a 2 dimensional $Piece String (, as field separator and ^ as record separator)
ClassMethod Kevin2() as %String(MAXLEN="") [SqlProc]
{
....... setup ResultSet
set output=""
while rs.Next() {
for col=1:1:rcws.GetColumnCount() { set output=output_rs.GetData(col)_"," }
set output=output_"^"
}
quit output
}
- a similar thing could be rows as a list of JSON sets
ClassMethod Kevin3() as %String(MAXLEN="") [SqlProc]
{
set output=""
&SQL( SELECT LIST(line) into :output FROM (
Select top 3 JSON_OBJECT('Name':Name
,'ZIP':Home_ZIP
,'State':Home_State) as line
from sample.Person where name [ 'A' )
)
)
quit output
}
/// {"Name":"Xiang,Agnes O.","ZIP":56604,"State":"MT"},{"Name":"Zubik,Bill A.","ZIP":78872,"State":"NV"},"Name":"Schaefer,Alvin X.","ZIP":63607,"State":"ME"}
in all cases you have to disassemble the result on the EXCEL end.
BUT as this is MS-EXCEL
my personal preference would be anyhow to connect to Cache over ODBC with a local DSN
and just call your data via SQL and get back a full working XLS table that feeds the rest in your XLS.
This is standard in EXCEL and except for the DSN the same for ACCESS or real DBs.
(as I don't own and use EXCEL any more I can't offer an example)
- your initial question didn't mention CSV nor MS-EXCEL
so my Article on Light weight EXCEL Download may apply
https://community.intersystems.com/post/light-weight-excel-download
or Tips & Tricks - SQL to Excel
https://community.intersystems.com/post/tips-tricks-sql-excel
HTH,
Robert
An alternate approach to SOAP:
a) you run your query over JDBC on your DataServer
so you can query what ever you like
b) slightly more sophisticated
you create a ClassMethod with [SqlProc] parameter and also call it over JDBC
like this. SELECT Pkg.Class_ClassMethod()
It's totally up to you what the content of your return value is.
I personally prefer JDBC as it's platform independent
in fact b) is pretty much the same as SOAP just with a different transport that avoids %CSP and its side effects.......
Proposal:
Store your JSON String as %String(MAXLEN="") like a log file
for the typical components type, age, firstname, lastname, ...
create calculated properties that find its content by $piece, $find or some JSON specific stuff.
setup an index on those calculated properties to find your record.
With this approach you keep the origin as you get it and get te indices you may require.
It's pretty similar to what I did to mimic an XML DB with Caché
so 1) =NO 2) =see above 3) =YES 4) = it's just another challenge
Evgeny,
it's great !
only the link requires adjustment.
NOT https://community.intersystems.com/post/github.com/intersystems-communi…
but https://github.com/intersystems-community/
Hi Tim,
I'm highly interested to see this result.
I tried to do something similar recently to to be able to feed back to the sender what was wrong if something was wrong.
I failed to get the combinations of params for XERCES parser right. XMLIGNORE* worked OK but was not so useful.
You might have a shorter link to contact Marvin Tenner then me.
![]()
As we see your ID is combined by 3 properties
for the sake of this example I name them id01, id02, id03
so your ID is this combination ID = id01_"||"_id02,_"||"_id03
so you may reformulate your query to make it readable
I'd suggest you apply as Support Engineer @ InterSystems
and over the years you might learn all the secrets of Caché.
I doubt what you ask for is subject for a public forum.
check side conditions of the related column.
from docs:
See details here:
http://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY…
especially:
Sample Global Names and Their Uses
If your connection is not stable enough I'd suggest to take a closer look to good old Shadowing.
It's really jungle proof.
I used it in past to transfer data from an oil drill platform somewhere out on the ocean over a satellite link with just 64k bd bandwidth without any data loss. And this link was far from whatever you would expect from a wired connection on ground.
Shadowing did id with incredible stability and no loss.
Cascading of shadowing is also almost unlimited with no issue.