what product/component are you interested in?
- IRIS
- ENSEMBLE
- HEALTHSHARE
- CACHÉ
- TRAK
- iKNOW
- DEEPSEE
- ..
- ...
and others is as wide as the whole software industry
please be more specific
- Log in to post comments
what product/component are you interested in?
and others is as wide as the whole software industry
please be more specific
in addition, it would be worth to see what your SQ.CBPhoneResult_View does.
By the ending VIEW I assume it is a View and not a Table:
So the complexity of the executed query is hidden and could be the real performance problem.
This is a contradiction as CSP doesn't use ODBC driver
So what are you really assuming to do ??
Anyhow in both cases a SQL String delimiter (') entered in a %String property aka VARCHAR is always presented as it was entered.
I verified it over an external ODBC viewer + Intersystem ODBC driver as well as over JDBC: no issue.
For ODBC on Windows just use 64bit Version on 64bit platforms.
in addition, you may verify your query also from the terminal prompt without any eventual timeout:
if you define a method mymethod() as something
You are expected to terminate ist either by QUIT anyvalue or RETURN ayvalue
in your example you announce a %Status. so Quit $$$OK would be fine like this
ClassMethod getFile() as %Status
{
set filename = "/home/test.json"
set newArray={}.%FromJSON(filename)
write "New entity:"_newArray.%ToJSON()
quit $$$OK
}
if you ommit as %Status you can allso forget the ending QUIT
You are wrong: getFile+8 is
so either resultSet. or resultSet.rowSet is not what you expect it to be.
first you do
but you don't check the success code
And with "path/to/file.json" the file name looks more than suspicious to be correct.
next you do set obj=... but this obj isn't used at all.
next
and there is the fundamental mistake as your variable filename is
which is anything else than the expected JSON array
you may have lost some important lines during cut/paste from your example
Deserializing from JSON to a dynamic object may have important information for you
It means in row 8 of method getFile you try to use some object reference that doesn't exist yet or is not initialized yet.
posting some of your code could enable more precise diagnostic
Hi Scott,
It's indeed surprising.
But digging into docs tells me>>>> it's not an ERROR code but a RESULT code and 0 = Success. (like SQL)
more LDAP Result Codes
Err2String is defintely a misleading naming.
It could be sufficient to set ID=""
at the beginning of your code to avoid the <UNDEFINED> later down.
I try a simple explanation and you should try to find some docs on HTTP:
So I leave out several steps in between to illustrate the basic actions.
your browser sends a request
GET /index.html HTTP/1.1 Host: www.example.com
and if it is successful the server replies
HTTP/1.1 200 OK
Date: Mon, 23 May 2005 22:38:34 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 138
Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT
Server: Apache/1.3.3.7 (Unix) (Red-Hat/Linux)
ETag: "3f80f-1b6-3e1cb03b"
Accept-Ranges: bytes
Connection: close
<html>
<head>
<title>An Example Page</title>
</head>
<body>
Hello World, this is a very simple HTML document.
</body>
</html>
The highlighted part between HTTP and your first <html> is prepared or modified if not default in OnPreHTTP().
It has to be ready BEFORE sending the reply.
The delimiter between HTTP part and the content transmitted is just an empty line.
The closing is 2 empty lines.
For the items you can influence see class %CSP.Response
Analysing your code I found @ line 24
i $$$ISWINDOWS,$$$UseSecureConnection{
ending @ line 42 that contains s LD=##Class(%SYS.LDAP).Init($$$LDAPServer)
but i didn't see an ELSE if the first IF fails.
Then LD is undefined.
I'm a little bit surprised how it could go up to line 104
you do .ReadLineIntoStream()
doc says: https://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls
This reads from the stream until it find the LineTerminator and returns this as a stream. If the stream does not contain the line terminator this can potentially be the entire stream.
and your error message: Premature end of data 12 Line 1 Offset 1
indicates that you have hit some character interpreted as line terminator after 12 characters. (rather short for JSON)
My guess: your JSON input is a multiline input with enough line terminators inside
As a consequence your JSON input is incomplete.
Suggested workaround
eventually, it might be necessary to remove the line terminators before %FromJSON
with large numbers exceeding 64bit integers the logic with integer division \ and modulo #
was causing wrong results. So I changed it to pure string interpretation.
Recommendation:
pass all numbers as strings to escape from numeric normalization
NOT write $$^zahl(102100900002103201200301.6123100)einhundertzwei Trilliarden einhundert Trillionen neunhundert Billiarden zwei Billionen einhundertdrei Milliarden zweihundertein Millionen zweihundert Tausend
BUT write $$^zahl("102100900002103201200301.6123100")
einhundertzwei Trilliarden einhundert Trillionen neunhundert Billiarden zwei Billionen einhundertdrei Milliarden zweihundertein Millionen zweihundert Tausend dreihunderteins Komma sechs eins zwei drei eins null null
If you feel think this is exaggerated think about banking calculations for countries within low rated currencies.
You are right.
Though due to the internal limits, next time I would avoid \ and # operations in favor of $E() for the next version
As there are some strange effects in handling numerics due to normalization
Hola Francisco,
You motivated me to do something similar for German.
It's is straightforward .int routine and you are welcome to add the code to your project.
GermanNumberToText
I did it up to 10e21, negatives and unlimited decimals. (except what is cut down due to internal limits)
I tried to catch all the irregular structures of the language like singular/plural, varying genders, upper/lower case
and tried to keep the output readable:
For quick copy:
Updated to avoid failover from integer to floating format for large numbers (2018-06-28 16:34 UTC)
Before dealing with adapters you should check if your UDP reaches your server at all.
You always get it if your server is on the same LAN segment as the sender.
But you depend on the setup of the router in the case that it is not in your LAN "neighborhood".
2nd your firewall should be willing to let pass this UDP.
Then you may check the traffic with some external tool to make it visible.
Or you check it directly from terminal following the instructions in IO device guide
chapter UDP Client/Server Communication

you have the option to read by character using
READ *var
Then you read exactly 1 byte in its decimal representation
Docs on READ
You may also use %File Class and use a Read method with length 1
Use $ZCVT() function for decoding,
set y="<html><body><h1>Greater = > lower 0= < Ampersand = & OK</h1></body></html>"
write $zcvt(y,"I","HTML")
<html><body><h1>greater =>lower 0=<Ampersand = & OK</h1></body></html>
Attention all &..; have to be in lower case
See doc $ZCONVERT()
2 possible solutions:
see also my article Summary on Local Variable Scoping
Full doc is here :
https://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?APP=1&LIBRARY=%25SYS&CLASSNAME=%25Library.File
Method CopyFile:
https://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?PAGE=CLASS&LIBRARY=%25SYS&CLASSNAME=%25Library.File#METHOD_CopyFile
Vitaliy,
That's excellent. I had the vague feeling that it should be somewhere, somehow, ... ass these are all supported collations.
Now I have the correct solution!
Many thanks !
![]()
![]()
![]()
![]()
![]()
You can also create your own conversion function like this:
Then you simply use
SELECT SQL.fromUTC(CreationTime) FROM Table
to get the conversion
You try to upload a file and JS Code a the same time during your SUBMIT action.
so your &js< ...> lands every 32000 characters inside your file.
&js<..> is just a hidden WRITE and allows javascript syntax checking inside the <.. >
example:
&js<alert('Unable to create user.');>
is identic to
Write "alert('Unable to create user.');",!
So your concept doesn't work that way
You would require a second independent JS routine in a browser to call for progress using CSP hyperevent.
Oh dear, NO MORE LICENSES.
Then inconsistency is clear!
method %ProcessError should output the real error but what you see is the result of ZT "JGTW"
Your error lands in the highlighted line. But as the method is FINAL you can't overload it.
Your original class System.Object might be a less restricted copy.
In addition, I see ZTRAP command this may explain why Try / Catch didn't react as expected.
I was unable to identify the class System.Object you inherit for your proxy object.
But the methods you call are all available in %Net.Remote.Proxy
so verify the definition of System.Object
or change your class to
I think you fail in %OnNew() in ..%Constructor(..)
I might be worth for testing to replace
by
you miss a check in your code
Your connection may have failed, so next call will fail too,
looking into %SYS code for ^ERRORS( was disappointing.
WRC might have a better advice.
Yeah, I meant that.
You still may try from SMP>Administration>CSP Gateway Mgmt > Event Log to detect something.
Warning: I did this recently and found 4 years of log over I don't know how many upgrades.
Was it the same machine?
+ a clean shutdown in 2015 ?
Mounting your DB from Terminal "%SYS" may give you a better error message.