Question water huang · Sep 1, 2024

i use %SYSTEM.WorkMgr  to handle data by multicompile=1,but i find that,after WaitForComplete,the processes created by %SYSTEM.WorkMgr  are still stand by,

and status is evtw,after i run many times,the processes are more.and this will cause server falls into trouble.so my question is ,how to kill the processes that created by using the %SYSTEM.WorkMgr,and how to avoid  to make the server falls into trouble,why  this will cause server falls into trouble。and is there a better way to handle data by mult process?

0
0 0
Question water huang · Mar 3, 2024

hi there , when i convert a pdf to base64 data, and then restore the data to pdf,i find that ,i must read the same  as length of base64 data every time convert ,or i can't get the right pdf. the code is:

s pdf= ##class(%FileBinaryStream).%New()
pdf.Filename = $g(path)
len=24*30*2
byteList = pdf.Read(len)
while(byteList'=""){
baseStr = ##class(%SYSTEM.Encryption).Base64Encode(byteList)

length of baseStr  is 1970,

if len=24*30 length of baseStr  is 984,

when i covert the base64 data to pdf, the code is: 

0
0 305
Question water huang · Jan 15, 2024

hi there,when i use %XML.Reader parse XML to object,if the element value is null,the data in the table is $c(0),how avoid this?

my class file like this:

Class M.PATLIST Extends (%RegisteredObject, %XML.Adaptor) [ Inheritance = right, Not ProcedureBlock ]
{Property Data As list Of PAT(XMLPROJECTION = "ELEMENT");Parameter XMLIGNOREINVALIDTAG = 1;Parameter XMLIGNORENULL = 1;Parameter XMLNAME = "DATALIST";}

3
0 224
Question water huang · Dec 5, 2023

hi there,when object export to xml,i know that,it will call propertynameLogicalToXSD method,but i can`t find out that use %XML.Reader to parse XML to object  witch method will be called before ,

simple code like this:

Class Samples.NewClass2 Extends (%Persistent,, %XML.Adaptor)
{
Property OPDT As %Library.DateTime;
}

my xml is 

<NewClass2><OPDT>2023-11-30 11:07:02</OPDT></NewClass2>

and how parse it to object ,and not modify the xml?

4
0 375
Question water huang · Apr 6, 2023

hi,I meet a problem,i want to move huge data from ensemble to oracle.it`s about 3years business data.i have tried some case!

1.EnsLib.SQL.OutboundAdapter

i parse the data one by one,and translate it into inser or update sql statement then write to Oracle,it·s most slowly,and take more disk space。

2.save the data to a new table,and then use dbeaver transport data to oracle。

3.user linktable. save object as insert,but,i can·t user %openid method.

hope to find a high-efficiency way!

1
0 309
Article water huang · Mar 19, 2023 9m read

1.Background

        1.1 I met a few project that their interface servers were crashed. Cutoms wanted resume server as fast as we can. their servers are running at lan,and they can't use git,there are some namesapce in the server running different service,and usualy there is only one server.

        1.2 In the message,it has property in type of characterstream,as you know,the message search page doesn't support filtering with  property of characterstream,so it's so hard to find the messge you want.

        1.3 Other workmate may update the code on the server,and mybe their is something wrong.

11
2 637