Question
· Feb 26, 2018
Copy Files

Hi Guys,

I'm looking to Remove file from a location to another similar to CUT & Past function, I'm using this :

 s file=##class(%File).%New()
 d file.CopyFile(File,ArchivePath)
 d file.Delete(File)

and the copying is happening but not the Deleting, and help pls?

Thanks

0 16
0 2.3K
Question
· Feb 26, 2018
How export data using query

Hi, iam newbie on caché database.

Iam trying, export data from query.

I read in some article that is not so simple.

So I create a view then a execute a query insert into select statement.

I have problem to know the job progress. I execute an hour ago and nothing happened.

Iam using intersystems web IDE.

Thanks for help!

0 6
0 369

I am setting up a new Caché instance and I have managed to configure it where Caché username/password is required to initiate the Caché session:

csdfalsdkfjf@fra23e234sco:/opt/labmed/test/test81/proc$ csession cache1

Node: frxxco, Instance: CACHE1

Username:

I cannot find the setting in the management console that allows for unauthenticated login to a Caché session. Any help is much appreciated.

0 4
0 1.4K

Hi,

Getting below error on newly installed cache version 2017.2. This is running fine on another instance.

Q00QUASAR:TEST1>D $system.OBJ.CompileAll()

Detected 1229 errors during compilation in 145.4s.

Instance name:TEST2>D $system.OBJ.CompileAll()

Detected 202 errors during compilation in 211.7s.

Instance name:TEST3>D $system.OBJ.CompileAll()

Detected 784 errors during compilation in 186.6s.

TEST2>do $System.OBJ.CompilePackage("Calendar")

Compilation started on 02/25/18 17:21:33 with qualifiers ''

0 1
0 1.1K

I was running the %File:FileSet class query, with my development user, but I am unable to run this query for an application user. Does anyone know what resource or service is needed to run this query? Assume the user has access to a certain directory on the file system needed for the query.

On second though, having tried almost all the available resources and services, perhaps the user doesn't have access to the directory. How to tell when the error is this:

0 13
0 606

I have a 2GB CSP.log file that I need to investigate.

I'm using a %Stream.FileCharacter() object to open the file and then using the .FindAt() to search for a particular string.

I'm seeing the FindAt() stop after processing 49m characters?

Here is my code:

k
s stream=##class(%Stream.FileCharacter).%New()
d stream.LinkToFile("d:\csp.log")
s x=""
s i=0
s j=0
w stream.Rewind()
w stream.AtEnd
w stream.SizeGet()
while(stream.AtEnd=0){set i=stream.FindAt(-1,"Invalid password",x)+i  set j=j+1}
w stream.AtEnd
w i
w j

Which gives the following output:

0 7
0 706

Developers,

I am working with a CSP page with among other fields a checkbox.

Based on the checkbox I want to populate a drop-down box with specific options with a server side method using &html<....>.

I have the status of the checkbox in a javascript var.

Can I access this var or maybe the checkbox setting in the server side method?

Basically how do I know the status of the checkbox to populate the drop-down box correctly?

Any suggestions are appreciated!

Jacques

0 5
0 1.3K

Several $System.OBJ methods have ByRef errorlog argument:

Compile(ByRef classes As %String = "", qspec As %String = "", ByRef errorlog As %String, recurse As %Boolean = 0)

ImportDir(dir As %String = "", wildcards As %String, qspec As %String = "", ByRef errorlog As %String, recurse As %Boolean = 0, ByRef imported As %String, listonly As %Boolean, ByRef selectedlist As %String)

What's the best approach of working with errorlog?

Do you convert it to status? If so - how? Manual iteration over local?

Is there some system method to convert it into %Status?

0 1
0 334
Question
· Feb 20, 2018
REST Data Limit

I'm experimenting with sending large amounts of data in a POST payload to be stored as a stream. However I've noticed that no matter how many characters are in the message, Cache only gets about 32k of them, cutting off the rest. Conversely as expected it can only send about 32k worth of characters in a payload.

Before I get creative, is there a REST message size limit that can be changed? Or is there something else going on here?

Thank you!

1 9
0 1.1K

Let's say I want to execute this cache script (saved as test.txt) from OS terminal:

zn "USER"
write 1
zn "%SYS"
write 2
halt

Executing the following command in a terminal:

csession cache < test.txt

Would yield this output:

$ csession cache < script.txt

Node: gitlab-test, Instance: CACHE

USER>

USER>
1
USER>

%SYS>
2
%SYS>
Job succeeded

Is there a better way to run these scripts?

Currently I have two problems:

1 1
0 1K

I have a dataListBox in ZEN which has an OnDrawItem method associated with it. The DrawItem method never seems to be called and I cannot see why. I am using IE11. Can anyone suggest a reason? The attached code runs in a namespace called CODE and can be run using view webpage on the TheLabsApp.BioAnal class. Please note that the data is in a global called ^%ANAL that resides in %SYS.

1 3
0 237

Hi.. I have an issue where we are using OAuth2.0 with the ZAUTHENTICATE routine. Once our token is validated we are using a users lan id (passed on the ID token) to find a software defined username in a Cache Global.

That is all working fine in ZAUTHENTICATE.. I am setting the software defined username in the Properties("Comment") array and wanting to reference it in the Rest Service Dispatch class.

0 6
0 777
Question
· Feb 15, 2018
The Index on a String field

I noticed that the subscript of the index map is actually the collated field (%SQLUPPER).

Is String the only data type going through this transformation? Any other data type would also go through this transformation?

Thanks.

0 1
0 280