Then you need to specify MODE attribute as LOGICAL for that cspbind property. Documentation.
- Log in to post comments
Then you need to specify MODE attribute as LOGICAL for that cspbind property. Documentation.
Sure, execute this in a terminal to open a new terminal for an instance named cache:
do $zf(-2,"cterm.exe /console=cn_ap:cache")
Okay, and how do you access it?
Please post the property definition.
by default she send the value as DISPLAYLIST
How do you get property value?
Here's the version for windows and most linux distros:
ClassMethod RunPage(Url As %String = "http://intersystems.com")
{
#Include %occOptions
Set Browser = $Select($$$isWINDOWS:"start", $$$isUNIX:"x-www-browser", 1:"x-www-browser")
Set Command = Browser _ " " _ Url
Do $ZF(-1, Command)
}If you have journaling enabled, you can parse them.
I doubt that this kind of information is available.
Have you thought about wrapping global calls in a method?
ClassMethod SetVal(glvn, value)
{
// track statistics, like $Username changed glvn from oldvalue to value, etc.
set @glvn = value
}Simpliest way: Cache executes an operating system command via $zf(-1) function.
Alternatively, you can load a dll with $zf(-4) (also 3, 5) functions.
There is also CNA project - it provides an interface for using native C-compatible shared libraries without anything but Caché ObjectScript code. CNA is a wrapper for libffi. CNA consists of native library (libcna) and Caché class (CNA.CNA). It is a wrapper around $zf functions.
That said, the most effective would be some kind of a library load with library written in either C or generated from some computational language. For example Mathlab can generate C code, which can be then compiled into a library.
Something like this? I had a similar problem, but the check was required only for part of the properties. If you want all of them, remove the line with continue.
Method IsEmpty() As %Boolean [ CodeMode = objectgenerator ]
{
For i = 1:1:%class.Properties.Count() {
Set Prop = %class.Properties.GetAt(i)
CONTINUE:(Prop.Internal || Prop.Calculated || Prop.ReadOnly || Prop.Private || Prop.Identity)
Do %code.WriteLine(" Quit:.." _ Prop.Name _ "'="""" $$$NO")
}
Do %code.WriteLine(" Quit $$$YES")
}
Are you in %SYS namespace? Underlying database (CACHELIB) is probably mounted as read-only.
Can you post an error message?
Alternatively, instead of 2-4 you can set TimeFormat value in your class by overriding some init callback ( %OnAfterCreatePage maybe, don't forget to call ##super() though) and setting it there. It would be a better solution.
2020 UPDATE.
I think I found a better solution.
1. Extend EnsPortal.MsgFilter.Assistant class.
2. In this class redefine EnumerateExecute method to provide the desired format. Replace this line:
Do ..addTerm(.aSelect,"{fn RIGHT(%EXTERNAL(head.TimeCreated),"_dateLen_"
)} As TimeCreated")to provide the format you need.
Alternatively redefine OnFinalizeSQL to replace
{fn RIGHT(%EXTERNAL(head.TimeCreated),999)}with something else.
3. Set the global
^EnsPortal.Settings("MessageViewer","AssistantClass")to the value of your class.
This looks like an official way to modify MessageViewer behavior.
12th piece is the FreezeOnError property for a Database and is always set to on (since 2008.1.0.217.0). The corresponding property FreezeOnError was removed from SYS.Database class.
Sorry, I forgot that SYS.Database is deployed. You'll need to match $zu(49) to properties manually. But the macros usually have the same name. For example field 14 is sfnpiece macro ("piece" part of the name is irrelevant, so just sfn it is) and it corresponds to SFN property in SYS.Database.
To test, you can write the following method:
ClassMethod Test( Directory )
{
Set db=##Class(SYS.Database).%OpenId(Directory)
Write db.SFN = $p($zu(49),",",$$$sfnpiece) //14th piece
// More checks
}Check where in ParseZU49Info it takes field 14 and what property does it fills with that information. Check %syDatabase.inc for more information.
#; Pieces of return value from $zu(49) #define mountpiece 1 #define blksizpiece 2 #define uicpiece 3 #define filsizpiece 4 #define expandpiece 5 #define maxblkpiece 6 #define glodirpiece 7 #define gloptrpiece 8 #define rdirpiece 9 #define rgrpiece 10 #define glogrpiece 11 #define freezepiece 12 #define colpiece 13 #define sfnpiece 14 #define totvolpiece 15 #define formatpiece 16 #define attribpiece 17 #define statuspiece 18 #define exptimepiece 19 #define nojrnpiece 20 #define bigdbpiece 21 #define curblkspiece 22 #define blkspermappiece 23 #define curmapspiece 24 #define resourcepiece 25 #define enckeyidpiece 26
ParseZU49Info method in SYS.Database class translates $ZU(49) call into SYS.Database properties.
- where can I get cache.node? The link in the Intersystmes documentation http://globalsdb.org/downloads/ doesn't work. I found cache0100.node and cache0120.node in my Cache instance's \bin directory. But I am not sure if I can use them or not.
Cache instance's \bin directory is the correct path.
Can anyone recommend any tutorial or code example with installation instructions?
Samples are provided in <CacheDir>\dev\node.js\samples directory. Installation instructions are located in settings.js file.
If they are defined in one class, try:
ClientMethod logout() [ Language = javascript ] { this.DoLogout(); } I export/import ^DeepSee.Variables global.
Runtime Variables are for that purpose.
And if you want to apply filter to any MDX query against a cube, you can specify a %OnGetFilterSpec callback.
No.
These changes fixed it:
Class Wendy.LTCodes Extends %Persistent [ StorageStrategy = LTCStorage ]
{
Property Code As %String;
Property Description As %String;
Property Invalid As %Library.Boolean [ SqlComputeCode = { set {*} = ##class(Wendy.LTCodes).GetInvalid({Code})}, SqlComputed, Transient ];
Index CodeIndex On Code [ IdKey, PrimaryKey, Unique ];
ClassMethod GetInvalid(WSCode) As %Boolean
{
Quit $G(^LTCODES(WSCode,"INVALID"),0)
}
Method InvalidGet() As %Boolean
{
Quit ..GetInvalid(i%Code)
}
Method InvalidSet(value As %Boolean) As %Status
{
Set ^LTCODES(i%Code,"INVALID")=value
quit $$$OK
}
/// Do ##class(Wendy.LTCodes).SetData()
ClassMethod SetData()
{
kill ^LTCODES
S ^LTCODES("N001")="ANYOLD DESC"
S ^LTCODES("N001","INVALID")=1
S ^LTCODES("N002")="C5 REPEAT 1"
S ^LTCODES("N111")="SPECIMEN COMMENT"
S ^LTCODES("N200")="MSUD SCREEN|MSUD"
S ^LTCODES("N500")="Sickle Cell Screen"
}
Storage LTCStorage
{
<SQLMap name="LTCMap">
<Data name="Description">
<Delimiter>"|"</Delimiter>
<Piece>1</Piece>
</Data>
<Global>^LTCODES</Global>
<Subscript name="1">
<Expression>{Code}</Expression>
</Subscript>
<Type>data</Type>
</SQLMap>
<StreamLocation>^Wendy.LTCodesS</StreamLocation>
<Type>%CacheSQLStorage</Type>
}
}How do you access the data?
I imported your example, executed:
Do ##class(Wendy.LTCodes).SetData()
Then executed this sql:
SELECT ID, Code, Description, Invalid FROM Wendy.LTCodes
and received the following results:
| ID | Code | Description | Invalid |
| N001 | N001 | ANYOLD DESC | 1 |
| N002 | N002 | C5 REPEAT 1 | |
| N111 | N111 | SPECIMEN COMMENT | |
| N200 | N200 | MSUD SCREEN | |
| N500 | N500 | Sickle Cell Screen |
seems to be working.
But then I didn't really understand the use of Parameter InvalidGLVN = "^Utils.GlobalPropP";
it's for use with indirection. Example:
set ^Utils.GlobalPropP = 123
set glvn = "^Utils.GlobalPropP"
write glvn
> ^Utils.GlobalPropP
write @glvn
> 123Your error:
<INVALID 0REF>zSrvGetData+2
Points to the line;
set item = ..%GetComponentById("Item").valueAnd means that the result of this call:
..%GetComponentById("Item") Is not an object, so you can't access a property "value".
You can define a property of %Stream.Object class and store %Stream.FileBinary/%Stream.FileCharacter there.
Why not use %Stream.FileBinary and %Stream.FileCharacter? It would store the file outside of the database.
I removed InvalidGet method and object access to the property stopped working.
Class Utils.GlobalProp Extends %Persistent
{
Parameter InvalidGLVN = "^Utils.GlobalPropP";
Property Invalid As %String [ SqlComputeCode = {set {*} = ##class(Utils.GlobalProp).InvalidStatic()}, SqlComputed, Transient ];
ClassMethod InvalidStatic() As %String
{
Return $Get(@..#InvalidGLVN)
}
Method InvalidSet(val As %String) As %Status
{
Set @..#InvalidGLVN = val
Return $$$OK
}
/// Do ##class(Utils.GlobalProp).Test()
ClassMethod Test()
{
Do ..%KillExtent()
Set obj = ..%New()
Write "Invalid old: " _ obj.Invalid,!
Set obj.Invalid = $Random(100)
Write "Invalid new: " _ obj.Invalid,!
Do obj.%Save()
Kill obj
&sql(SELECT Invalid INTO :invalid FROM Utils.GlobalProp WHERE Id = 1)
Write "SQLCODE: " _ SQLCODE,!
Write "Invalid sql: " _ invalid,!
}Outputs:
Invalid old: Invalid new: SQLCODE: 0 Invalid sql: 65
Related Int code:
zInvalidCompute(%id)
New %tException,%val set %val = ""
try {
set %val = ##class(Utils.GlobalProp).InvalidStatic()
} catch %tException { throw %tException }
Quit %val
zInvalidGet() public {
If i%Invalid = "" { Set ..Invalid=..InvalidCompute($listget(i%"%%OID")) } Quit i%Invalid }
zInvalidSQLCompute()
// Compute code for field Invalid
set %d(2) = ##class(Utils.GlobalProp).InvalidStatic()
QUIT
Do $System.Status.DisplayError(tStatus)
Write !
}
Quit
}
}If our SVN repository already is storing discrete .cls files, does Atelier do any conversion when we load from SVN into our server instance?
No, except maybe for repository structure. That depends is Atelier + EGit support repository structure you use. For how to use EGit with Atelier check this article.
At what point would I see .udl files? I am thinking I would only see that if SVN was storing .xml and each of those would be converted to .udl.
There are no .udl files. There are just cls/mac/inc etc files in udl format, meaning they are represented on disk as is and not in the xml format. The extension would be .cls and so on. Here's the sample repository created with Atelier.