abstract class apptools.core.sys
Parameters
|
Properties
|
Methods
|
Queries
|
Indices
|
ForeignKeys
|
Triggers
|
|
|
44
|
|
|
|
|
classmethod ClassExist(class)
as %String
Is there such a class
write ##class(apptools.core.sys).ClassExist("Spgz.model.spgz")
classmethod CreateResourse(res, type="")
d ##class(apptools.core.sys).CreateResourse(.res,"NotPre")
classmethod DismountDB(Database)
as %Status
w $System.Status.GetErrorText(##class(apptools.core.sys).DismountDB("ASURPROD"))
classmethod DismountListDB(Database, write=0)
as %Status
zn "app" w $System.Status.GetErrorText(##class(apptools.core.sys).DismountListDB("DOJO"))
classmethod Export(jdbc="OEBS", msg, class, NoDel=0, sql="", write=0)
Delete and Export the table in oeBS when the match is in Description
Sample d ##class(apptools.core.sys).Export("OEBS",.msg,"Mvk.model.Characteristic")
s class="Spgz.model.PP.Files" d ##class(apptools.core.sys).Export("OEBS",.msg,class,1,"select * from "_##class(apptools.core.type).GetTableName(class)_" where FileID='127'")
classmethod ExportSecurity(dir="/iris-backup/install/security/")
as %Status
d ##class(apptools.core.sys).ExportSecurity()
classmethod GetDirDB(nspace, ByRef db, ByRef dirlist, IRIS=1)
as %Status
write $System.Status.GetErrorText(##class(apptools.core.sys).GetDirDB("APPTOOLS",.d,.dir,0))
classmethod GetFullName(login)
as %String
Sample write ##class(apptools.core.sys).GetFullName("superuser")
classmethod GetObj(Query)
s a=##class(apptools.core.sys).GetObj("select top 1 * from model.SP where deletedDate is null order by importDate desc") zw a
classmethod GetRoles(mask="", ByRef list)
as %String
Sample w ##class(apptools.core.sys).GetRoles(mask,.roles)
classmethod GetSysUserProp(Name, Prop)
as %String
Get system user properties
do ##class(apptools.core.sys).GetSysUserProp($username,.Prop)
classmethod GetTabInfo(gn, info)
as %String
set a=##class(apptools.core.sys).GetTabInfo(gn,.Q)
classmethod GetUsers(mask="", ByRef list, ByRef sql, ByRef ext)
as %String
Get system users
kill users set ext(1)=" or FullName like '%Manager%'" w ##class(apptools.core.sys).GetUsers("super",.users,.sql,.ext) w !,sql,! zw users
kill users w ##class(apptools.core.sys).GetUsers("sup%,adm%",.users,.sql) w !,sql,! zw users
kill users w ##class(apptools.core.sys).GetUsers("sup%,admin",.users,.sql) w !,sql,! zw users
classmethod GetValue(gn, row, NameField)
as %String
Get one field value by its name from GN
set a=##class(apptools.core.sys).GetValue(gn,2,"QUANTITY")
classmethod GetValueGN(gn, row, NameFields)
as %String
Get the value of a field by its name from GN or a list of values
Format $listbuild
write ##class(apptools.core.sys).GetValueGN(gn,2,"QUANTITY,PRIMARY_UNIT_OF_MEASURE")
classmethod GlobalList(ns, ByRef list, SystemGlobals=0, Mapped=1)
as %Status
Global list
d ##class(apptools.core.sys).GlobalList("SAMPLES",.L)
classmethod GlobalSize(dir, ByRef list, SystemGlobals=0, FastFlag=1)
as %Status
Global list
d ##class(apptools.core.sys).GlobalList("SAMPLES",.L)
classmethod IndBuild(gn, ByRef ListFields, empty=0, clean=0)
as %Status
Create intexes of the tables based on the values of the specified fields
w ##class(apptools.core.sys).IndBuild(gn,ListFields)
classmethod IndGetRows(gn, ByRef FieldsValue, ByRef out)
as %Status
Get table rows by field value
s ggInc="^||tempRespInc" KILL @ggInc
set Fields(2)="109-19" write ##class(apptools.core.sys).IndGetRows(gn,.Fields,.out)
MERGE @ggInc=out(2) set st=##class(apptools.core.LogInfoPane).DrawSQL("r "_gn,100,$zu(5),$g(title),$g(ExecuteDraw),,,ggInc)
classmethod Integrity(nspace, dir="/iris-backup/iris-backup/integrity/", adddir="", ByRef filename)
as %Status
do ##class(apptools.core.sys).Integrity("APPTOOLS,APP,USER")
classmethod IsPreparedDB(name)
Check whether the database is prepared
w ##class(apptools.core.sys).IsPreparedDB("ENSDEMO")
classmethod IsPreparedNS(name)
Check whether the namespace is prepared
w ##class(apptools.core.sys).IsPreparedNS("%SYS")
classmethod ListDB(info, Flag="")
Get a list of database names separated by commas
w ##class(apptools.core.sys).ListDB(.info,"NotPre")
Flag = "NotPre" - exclude prepared
Flag = "NotTemp" - exclude tempory
classmethod ListNS(info, Flag="")
Get a list of domain namespaces separated by commas
write ##class(apptools.core.sys).ListNS(.info,"NotPre,Ens")
Flag = "Ens" - only where the ensemble is installed
Flag = "NotPre" - exclude prepared
classmethod MountDB(Database)
as %Status
zn "app" w ##class(apptools.core.sys).MountDB("DOJO")
classmethod MountListDB(Database)
as %Status
zn "app" w $System.Status.GetErrorText(##class(apptools.core.sys).MountListDB("DOJO"))
classmethod Run2Spool(exe, Output gn, oneline=1, count)
as %Status
do ##class(apptools.core.sys).Run2Spool("zw ^%apptools.Setting","^||gnTmp")
classmethod RunCmd(cmdOs="free", gn="^TaskGN", AddDateTime=0, dir=##class(%File).GetDirectory(##class(%File).TempFilename()))
Function to call the OS command in the result output
%SYS>d ##class(apptools.core.sys).RunCmd("sudo du -sm /opt/isc/ensemble/mgr/*| sort -nr",$na(^%apptools.Cmd("mgr",$zd($h,3))),1,"/iris-backup/temp/snmp/")
classmethod RunTask(cmdOs="free", gn="^TaskGN", query="%SYSTEM.License:Counts", dir=##class(%File).GetDirectory(##class(%File).TempFilename()))
Function to call from a regular task
%SYS>d ##class(apptools.core.sys).RunTask("snmpwalk -v 1 server.ru -c public 1.3.6.1.4.1.16563.1.1.1.1.10","^%apptools.TaskLic","%SYSTEM.License:Counts","/iris-backup/temp/snmp/")
classmethod SaveGateway(sql, pDSN, usr, pwd, result, top=100000)
s a=##class(apptools.core.sys).SaveGateway("select * from Sample.Person","Ensemble Samples","_system","") zw a
TODO save to gn
classmethod SaveQuery(query="%SYSTEM.License:Counts", gn="^%apptools.Task", datetime="")
Procedure for calling from a regular job and storing reports in the global
%SYS>d ##class(apptools.core.sys).SaveQuery("SYS.Database:FreeSpace")
%SYS>d ##class(apptools.core.sys).SaveQuery("%SYSTEM.License:Counts")
classmethod SaveQueryTab(query="%SYSTEM.License:Counts", gn="^||q")
%SYS>d ##class(apptools.core.sys).SaveQueryTab("%SYSTEM.License:Counts")
classmethod SaveSQL(SQL, gn="^mtempSQLGN", ext=0)
as %String
/*! \brief Procedure query executing and storing reports in the global
\ingroup query
\param ext=1 add saving column and row positions
\return count rows
\example d ##class(apptools.core.sys).SaveSQL("select * from Ens.MessageHeader where id=1461","^logMSW2") */
classmethod SetTableFooter(gn="^mtempSQLGN")
as %String
do ##class(apptools.core.sys).SetTableFooter("^||gn")
set st=##class(apptools.core.LogInfoPane).DrawSQL("result ^||gn")
classmethod SetTableHeader(gn="^mtempSQLGN", arg...)
as %String
do ##class(apptools.core.sys).SetTableHeader("^||gn","Head1","Head222","Head3333")
classmethod SetTableRow(gn="^mtempSQLGN", row, arg...)
as %String
for i=1:1:10 do ##class(apptools.core.sys).SetTableRow("^||gn",i,"row"_i,"row222-"_i,"row3333-"_i)
classmethod SetValue(gn, row, NameField, val)
as %Status
Set one field value by its name from GN
if ##class(apptools.core.sys).SetValue(gn,2,"QUANTITY","newval") zw @gn@(2)
classmethod SqlToDSN(sql, DSN, result, top=100000)
as %Status
Get a DSN request
w $System.Status.GetErrorText(##class(apptools.core.sys).SqlToDSN("SELECT * FROM xxmv.xx_t359_pzn","OEBS-Daily","^tmMSWq"))
classmethod SqlToDSN2(sql, DSN, result, top=100000)
as %Status
Get a DSN request
w $System.Status.GetErrorText(##class(apptools.core.sys).SqlToDSN("SELECT * FROM xxmv.xx_t359_pzn","OEBS-Daily","^tmMSWq"))
classmethod getCSPapps(csppapp, prop)
//get csp apps
w ##class(apptools.core.sys).getCSPapps("/apptools","Path")
classmethod getEnsProd(name, info)
Get a list of products in namespace
w ##class(apptools.core.sys).getEnsProd("ENSDEMO",.info)
classmethod getSQLConnection(ByRef List As %String = "")
w ##class(apptools.core.sys).getSQLConnection(.list)
classmethod logout()
as %Status
Sign Out
d ##Expression(##class(apptools.core.sys).logout()
classmethod sql2gn(sql, jdbc="", gn, top=100000, journl=0)
as %Status
write ##class(apptools.core.sys).sql2gn(sql,jdbc,gn)
write ##class(apptools.core.sys).sql2gn("SYS.Database:FreeSpace","q","^||tmp")
set a=##class(apptools.core.sys).GetValue(gn,3,"QUANTITY")