go to post Mark Hanson · Sep 9, 2016 Why do you want the connection id to change? In CSP we route multiple requests to a few server processes to be able to handle massive numbers of client efficiently. However the process that handles the request does not hold any information about the session at all, all this information such as the license we hold is in the %session object so as long as you have a new %session object this is a brand new connection.
go to post Mark Hanson · Sep 8, 2016 This appears to be a duplicate of this item:https://community.intersystems.com/post/csp-erro-upgrade-cache-161The solution for how to lookup these error macros by wrapping them in $$$ERRORCODE is the correct approach. An alternative for the one error page you are having problems with is to manually include %occErrors.inc include file.
go to post Mark Hanson · Sep 7, 2016 I think we may need some more context of what the code looks like and exactly what error message you are getting. We do support $$$CacheError in 2016.1, for example: Set status=$$$ERROR($$$CacheError,$zerror) If you are trying to lookup the macro value then use $$$ERRORCODE($$$CacheError), then you can write logic like: If errorcode=$$$ERRORCODE($$$CacheError) Write "It was a Cache error",!
go to post Mark Hanson · Jul 23, 2016 You do not need to override the propGet method here as this will be generated automatically to call the sqlcomputecode if that is defined.
go to post Mark Hanson · Jul 7, 2016 Try:<script language="Cache" method="OnPreHTTP" arguments="" returntype="%Boolean"> Set %response.ContentType = "text/xml" Quit 1</script><?xml version="1.0" encoding="UTF-8" ?>As the cr/lf after the </script> will end up in the output we generate as this is part of the HTML output rather than inside the script itself.
go to post Mark Hanson · Jun 23, 2016 You are right, I had missed this was creating a %Status and thought they just needed the error code. To create a %Status value I would always use the $$$ERROR macro as you suggest.
go to post Mark Hanson · Jun 23, 2016 The correct way to do this is:set RunStatus=$System.Status.Error($$$ERRORCODE($$$GeneralError),"DXL Testing Run Error")So use $$$ERRORCODE which can convert the error code to the number correctly.
go to post Mark Hanson · May 20, 2016 Thank you for this really useful article, there is some great information here.
go to post Mark Hanson · May 16, 2016 FYI: I get consistently slower performance with the 'for' loop variation here (around 10% slower) so at least in my simple test the while loop both looks nicer and runs faster.
go to post Mark Hanson · May 13, 2016 Much better, the main page request is down to 1.0s and total load time is 1.7s which while still slow is no where near as bad as >6s, thanks.
go to post Mark Hanson · May 13, 2016 The MAK4540 fix was approved for porting to 2016.1.1 and all later releases.
go to post Mark Hanson · May 12, 2016 I fully agree with hoisting constants out of a loop and have recently spent a while optimizing code to use $listnext in SQL and so agree it is a much faster way to iterate over $listbuild structures. However in your first case of a 'For' loop the end condition is evaluated when entering the loop the first time and is not re-evaluated at all, for example run this: CACHE20164:USER>set a=2 for i=1:1:a { set a=10 write i,! } 1 2 As you can see it always stops at '2' rather than going on to '10'. Also there is overhead in converting from a delimited string into a $list format in order to use the more efficient $listnext, you can avoid the O(n^2) overhead with the regular $piece(string,",",i) code in a loop using $find with a starting position and then $extract the item you need. This should perform better than $listnext version of the loop at least for mid sized strings as it avoids the conversion overhead.
go to post Mark Hanson · May 12, 2016 The use of ZZW was a mistake and we removed this in the next release after it was introduced.I did not see any documentation that said that 'ZZ' was reserved for any particular use and the examples in the documentation show functions that do not use 'ZZ' as part of their name so I was trying to avoid user extensions in naming the item 'ZZPRINT' by assuming we can use 'ZZ' and customers will use 'Z<something else>'. I apologize if this caused a problem for you, that was the opposite of my intension.
go to post Mark Hanson · May 11, 2016 On the initial page displayed if you click on any of the links such as the Improved SQL Processing Performance item it takes you to a link which eventually times out, looks like these are missing the 'beta' as the first part of their url: http://docs.intersystems.com/csp/docbook/DocBook.UI.FramePage.cls?KEY=GC...
go to post Mark Hanson · May 11, 2016 I would generally advise against using %File class for reading files as this is a very low level wrapper around the COS file commands. For example if you want to apply a translate table you need to know about the 'K' flag on the open command. I much prefer using the %Stream.FileBinary or %Stream.FileCharacter classes as these provide a much more consistent interface to the file.
go to post Mark Hanson · Apr 16, 2016 I often do this too, I think this sort of pattern is a good way to make the error handling simple and consistent.
go to post Mark Hanson · Apr 14, 2016 The problem with this is I believe they do not want the object saved into the database at all. It seams like a worthwhile enhancement that export to XML could optionally call %ValidateObject on the objects as it walks the tree.
go to post Mark Hanson · Apr 14, 2016 I fully agree that using the line by line monitor is the way to go, take a look at %Monitor.System.LineByLine.cls which provides an API to turn this on/off and get information out of the line by line monitoring. Also for mapping INT lines back to source lines you can look at the API in %Studio.Debugger.cls in method SourceLine. This class does say it is internal but I think this particular method should be fine to use.
go to post Mark Hanson · Apr 10, 2016 This is not possible, as you suggest you should put the methods you wish to call at generator time in another class and make sure you create a dependency with this other class using the 'DependsOn' keyword to make sure we fully compile this other class first.