just use a single liner from terminal for the last 10 lines or any number you need
- Log in to post comments
just use a single liner from terminal for the last 10 lines or any number you need
Hi Jenna,
my personal experience with binary over HTTP is painful.
I'd suggest using Base64-Encoding (which means ASCII readable Characters only)
The downside is you have to decode it at the receiver side.
But that way it should be foolproof over across all proxy-, web- and other servers in between.
HTTP was invented when there was EBCDIC for 8 bit and ASCII for 7 bit. And some transport software hasn't improved since.
why not use a free local mail server for testing?
I personally use the german speaking Hamster. But there are lots of them. Google is your friend
make your formula f = x + 20(y*y) > z
a calculated, SQLcomputed property in your TABLE
and provide it with a bitmap index and it will run distributed and be incredible fast
docs:
https://docs.intersystems.com/iris20192/csp/docbook/DocBook.UI.Page.cls?KEY=GOBJ_proplit#GOBJ_proplit_computed
https://docs.intersystems.com/iris20192/csp/docbook/Doc.View.cls?KEY=RSQL_C145362
error -400 means there is an internal error
It might be caused by using object properties as :context.anyname inside embedded SQL
give it a try and use "simple variables" as :%myanyname , :%myShipmentTrackingNo
and fill the context object outside the embedded SQL
as you do with SQLCODE
I'm surprised you don't see the obvious performance difference of looking for something of distinct length at the beginning of a string
vs. scanning an eventual rather long string for some bytes somewhere eventually including also composed strings as %AB%CD%.
keep in mind: Caché is built for speed, not for the comfort of the average programmer
%STARTSWITH relates better to Caché internal structures and is faster in larger scale
what you seem to look for is $LISTTOSTRING
same concept as .toString in Java, just no dot
USER>w $ZDATETIME($h,3)
2020-02-08 00:59:59
USER>w $ZDATETIME($h,-2)
1581120005
docs: https://cedocs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=RCOS_fzdatetime
The API is the System Mgmt Portal or do ^SECURITY from Teminal in %SYS namespace
Correction:
in SQL.Shell you get a partial result
Once the query is running it is not interested in any browser activity.
BUT:
the query is stopped when you fall into the session timeout
and the related process (and any query) is terminated.
SO it not running forever!
the benefit of the shell is:
you can stop it by <CTRL>+C immediately. But also don't get any output.
so it's rather a KILL than a STOP
in Caché Terminal you may
;;; see I/O device guide for more details
The name of the io table is really just UTF8 with no hyphen !
So you force translation to internal format.
Reading from Caché with "utf8" set should do it as well.
So Caché normally should be ok.
Have you tried to read the HEX codes stored. (eg. by http://www.pspad.com/ )
I had the experience that especially with Windows some well-written files
looked bad by false (back)translation in some cases.
(Notepad is one of the ugly beasts to stick with 8 bit chars.)
It looks to me somehow like double encoded.
Does your installation run as 8bit national (iso latin1) set or as wide char. unicode PTUW ?
Mgmt Portal "About" tells you .png)
Assuming that cdate has a rather narrow selectivity
#1) looking for a distinct value (1) gives a rather moderate result set. So the index global might not consume too much buffer blocks.
#2) looking for >1 (combined with a significant EXTENTSIZE may create a huge resultset.
So it is wise to scan the index global first {typically less blocks than data global] and keep the hits sorted by ID.
Then you run with this hit list along the master map through your data global. Assuming that data require
significantly more block reads than the index global.
With a reasonable amount of Global buffers, your temp Global even might not see the Disk storage at all.
You see it's a bunch of assumptions hidden in this query plan.
The main goal, in any case, is to have as less "disk" access as possible.
I quoted "disk" as storage has so many kinds of variations that it just stands as a synonym.
Download as by PRODUCTS / Download IRIS .
Never heard of J-Report before.
Sounds good.
Does this imply to allow more than one accepted Comment / Reply ?
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.
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
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
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.
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.
Fully support this! Just working with user _SYSTEM is not funny.
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
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
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.
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
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.