Null in this case is not a reserved word. It’s just a name of variable that is not defined.
- Log in to post comments
Null in this case is not a reserved word. It’s just a name of variable that is not defined.
Quoting doc: "Name indirection, argument indirection, and XECUTE commands that appear within a procedure are not executed within the scope of the procedure."
https://docs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=GCOS_usercode_indirxecjob
Consider method:
Class Test.test [ Abstract ]
{
ClassMethod ind()
{
kill info
set active = 1
set i="active"
set @i = "global scope"
break
}
}
Output:
USER>do ##class(Test.test).ind()
break }
^
<BREAK>zind+5^Test.test.1
USER 2d1>w
active="global scope"
<Private variables>
active=1
i="active"
Notice private variables and public variables.
For drawbacks of Parent/Child relationships see this comment by @Brendan Bannon
Please see this question:
https://community.intersystems.com/post/difference-between-method-and-classmethod-class-definition
Check that after &SQL(SELECT ...) value of SQLCODE is checked.
Caché ODBC drivers are located here: ftp://ftp.intersystems.com/pub/cache/odbc/
InterSystems IRIS ODBC drivers -- here: ftp://ftp.intersystems.com/pub/iris/odbc/
Lucas,
Log that you provided spans from March 19th 09:35 to March 20th 14:43.
Depending on moments when application was unavailable you need to look in different records of csp.log
For example,
I would advise to you to try installing latest release version of CSP Gateway, or if this error still appears there, contact InterSystems Worldwide Response Center to fix this error.
This is most likely something with the code of the page "/csp/erp/system/lib/filtro.csp". It started to write some answer back and then closed the connection, for example process terminated itself with halt
This message is self-explanatory
CSP Gateway can limit number of total connections to server and connections per session that it makes to Caché. See parameters "Maximum Server Connections" and "Maximum Connections per Session" here.
Generally for IIS-specifics read section "Microsoft IIS All Versions" of CSP Gateway configuration guide. And for general configuration of CSP Gateway -- chapter "CSP Gateway Operation and Configuration".
David,
can you please provide provide SQL generated by the Entity Framework that is not valid and error that is generated.
Seems like
set $list(i%List, *, *) = ""
works.
Jimmy, what version do you use? Try to upgrade to latest available version -- 2018.1.2 for Caché, perhaps this error is fixed there.
There is a qualifier /incremental that allows incremental compilation.
Check if it's enabled and try to disable it:
See "Flags and Qualifiers" section: https://docs.intersystems.com/ens20101/csp/docbook/DocBook.UI.Page.cls?KEY=AMISC#AMISC_FlagsQualifiers
Both Caché and InterSystems IRIS support ODBC. So you can connect to them from PHP via ODBC.
Reason for "0.001005933" being string is not that it is less than 1, but that it's not in a canonical form.
That is -- it has integer zero before decimal point.
Put '+' before expression:
USER>Set MsgDT = "20180405000000001005933"
USER>Set MsgDTH = + $ZTH(($E(MsgDT,9,10)_":"_$E(MsgDT,11,12)_":"_$E(MsgDT,13,14)_"."_$E(MsgDT,15,23)),1)
USER>write
MsgDT=20180405000000001005933
MsgDTH=.001005933
You should use Locate:
Set tRegEx = "<[^>]*>"
Set htmlSnippet = "<h1>Hello1</h1><h1>Hello2</h1>"
Set regex=##class(%Regex.Matcher).%New(tRegEx)
set regex.Text = htmlSnippet
while regex.Locate() {
write "Found ",regex.Group," at position ",regex.Start,!
}
Also it's not possible to parse generic HTML with regular expressions (https://stackoverflow.com/a/1732454/82675). Limited subset of HTML -- maybe.
Hi Nael
Not possible, as far as I know.
You can play with $stack. Something like this:
set Result=$$MyFunc(1,.Out)
quit
MyFunc(Param1,Param2)
write $stack($stack-1,"MCODE"),!
set Param2="it's all good"
quit 1
USER>d ^test
set Result=$$MyFunc(1,.Out)
But here you are looking at parsing plain strings, and this is error-prone.
Hi Colin.
You can get .Net bindings package from Components section of WRC download page (https://wrc.intersystems.com/wrc/coDistGen.csp)
Indeed, documentation [1] says that this is "Number of private global data blocks used by this process.". So this is due to process-private globals
You can inspect these global using ^GETPPGINFO utility [2]
[1] https://irisdocs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=GSA_manage [2] https://irisdocs.intersystems.com/irislatest/csp/docbook/DocBook.UI.Page.cls?KEY=GCOS_variables_procprivglbls
To get environment variable you can use $System.Util.GetEnviron().
And to get current folder -- $system.Process.CurrentDirectory().
Not the smallest, but shortest -- 42 characters. Based on Robert's answer.
x $zwunpack("㵩㨱㨱〱‰㩷⍩㴳‰䘢穩≺眠椺㔣〽∠畂空•㩷⁸⁷‡")
Do you have DeepSee in license? Please provide output of
do $system.License.Decode()
Hi Luis-Ángel.
Generally, if you can connect successfully then configuration is fine.
Does this happen with every query? If you try some simple query, like 'select 1', will this work ?
If yes, does your query work from Management Portal ?
Also, try enabling Audit and event Protect and check if this event is logged into Audit when this happens.
Hi Jochen.
Have you looked at Microsoft forums?
There are lot of posts there with similar "Another installation is already in progress" error.
For example, following:
Currently it looks more like a problem with Windows Installer than with Caché
Hi Oliver.
It's hard to say what's wrong with your report, as example that you provided is not standalone -- it requires table AETMON.AvailabilityLog.
At least I think, you should change
Set var(tCount,0) = rs.%Get("availabilityStatus")
Set var(tCount,1) = rs.%Get("CreatedTime")
to
Set var(0, tCount) = rs.%Get("availabilityStatus")
Set var(1, tCount) = rs.%Get("CreatedTime")
You have seriesCount="1". That is amount of lines to show on chart. Then you have seriesNames="Name1,Name2". These are names of lines. So either here you should have one name, or seriesCount should be 2.
You have seriesSize="2". This is amount of points to draw from each serie. If you indeed need only 2 points, then that's OK. However, if you remove this attribute then all points are plotted.
Generally, please see class reference for %ZEN.Report.Display.COSChart.cchart. It explains many attributes.
Below please find small sample that works. Ignore ReportDefinition. It's just there to make report run.
I hope it'll give you some hints.
Class community.ClineReport Extends %ZEN.Report.reportPage
{
Parameter DEFAULTMODE As STRING = "html";
/// This XML defines the logical contents of this report.
XData ReportDefinition [ XMLNamespace = "http://www.intersystems.com/zen/report/definition" ]
{
<report xmlns="http://www.intersystems.com/zen/report/definition"
name="test" sql="select 1 q">
<group name="q" breakOnField="q"/>
</report>
}
/// This XML defines the display for this report.
/// This is used to generate the XSLT stylesheets for both HTML and XSL-FO.
XData ReportDisplay [ XMLNamespace = "http://www.intersystems.com/zen/report/display" ]
{
<report xmlns="http://www.intersystems.com/zen/report/display"
name="test">
<document width="8.5in"
height="11in"
marginLeft="1.25in"
marginRight="1.25in"
marginTop="1.0in"
marginBottom="1.0in" />
<body>
<clineChart
ongetData="getChartData"
title="Availability"
height="400px"
width="400px"
currYAxis="0"
labelsVisible="true"
lineStyle="red"
markersVisible="true"
plotStyle="stroke-width: 1px;"
seriesCount="2"
seriesNames="Name1,Name2"
seriesYAxes="0"
ongetLabelX="getAxisTime"
>
<yAxis minValue="0"
maxValue="100" />
</clineChart>
</body>
</report>
}
Method getChartData(
ByRef data,
chartObject)
{
for i=1:1:10 {
set data(0,i-1)=i * 2
set data(1,i-1)=i * 3
}
}
Method getAxisTime(
val,
yseries)
{
quit $zdt($H-100 + val)
}
}
Hi Matthias.
Try adding [Identity] to the attributes of property id in generated class.
Something like follows:
Property id As %Integer(EXTERNALSQLNAME = "id", EXTERNALSQLTYPE = 4) [ Identity, SqlColumnNumber = 2, SqlFieldName = ID ];
Hope this helps, Alexander.
Hi Salma.
Check for files with extension LUT. They represent Lookup Tables. You can add these files to Studio Export.
Hope this helps, Alexander.
Not possible to do this in Query. You need to use dynamic SQL.
Symbol ":" is used to indicate host variables. Host variables are treated as expressions, not as identifiers.
During query compilation host variables are replaced with placeholders.
Consider query:
SELECT FirstName, MiddleName, LastName, Email, UserType
FROM DB.ExternalUsers
WHERE FirstName like :objSearch.FirstName
ORDER BY :objSearch.SortingField
This query is compiled as:
SELECT FirstName, MiddleName, LastName, Email, UserType
FROM DB.ExternalUsers
WHERE FirstName like ?
ORDER BY ?
Then during runtime you supply values as follows: objSearch.FirstName = 'A%' objSearch.SortingField = 'FirstName'
And query is executed as follows:
SELECT FirstName, MiddleName, LastName, Email, UserType
FROM DB.ExternalUsers
WHERE FirstName like 'A%'
ORDER BY 'FirstName'
Notice 'FirstName' is in quotes in ORDER BY. So you sort by literal string. That is doing nothing.
What you can do is to use expression like:
Order by CASE :objSearch.SortingField
WHEN 'FirstName' THEN FirstName
WHEN 'MiddleName' THEN MiddleName
...
END
Although such generic queries makes SQL Query Analyzer unable to reason what plan is better to use for this query.
I'm not sure for how much this is efficient, but you can use XSLT to do the transformation.
Class CMT.XmlToCsv [ Abstract ]
{
ClassMethod transform(
infile As %String,
outfile As %String) As %Status
{
Set tXSL=##class(%Dictionary.CompiledXData).%OpenId(..%ClassName(1)_"||XmlToCsv").Data
Set tSC=##class(%XML.XSLT.CompiledStyleSheet).CreateFromStream(tXSL,.tCompiledStyleSheet)
If $$$ISERR(tSC) Quit tSC
quit ##class(%XML.XSLT.Transformer).TransformFileWithCompiledXSL(infile,tCompiledStyleSheet,outfile)
}
XData XmlToCsv
{
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" />
<xsl:variable name="separator" select="','" />
<xsl:variable name="newline" select="' '" />
<xsl:template match="/">
<xsl:text>Col1,Col2,Col3</xsl:text>
<xsl:value-of select="$newline" />
<xsl:for-each select="//Details">
<xsl:value-of select="Col1" />
<xsl:value-of select="$separator" />
<xsl:value-of select="Col2" />
<xsl:value-of select="$separator" />
<xsl:value-of select="Col3" />
<xsl:value-of select="$newline" />
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
}
}
And then call it from terminal:
set p=##class(CMT.XmlToCsv).transform("c:\temp\input.xml","c:\temp\output.txt")
zw p
I took XSLT from https://stackoverflow.com/a/46176699/82675
You need to return Status from this method.
Everything that you write inside this method is placed inside SOAP-ENV:Body element
Method override(
proxy As %SOAP.ProxyDescriptor,
tag As %String) As %Status
{
Write "<request>hi</request>",!
Quit 1
}
Contact InterSystems Support:
https://www.intersystems.com/support-learning/support/immediate-help/
Following this useful table (https://stackoverflow.com/a/33206814/82675) you can have blinking text as follows:
USER>write $C(27)_"[5m"_"Hello"_$C(27)_"[0m"