Sage X3 How Get A List of Client Running Processes
Sage X3 How Get A List of Client Running Processes
processes
• Autore articolo
• Di mcarminati
• Data dell'articolo
• 15 Novembre 2012
• Nessun commento su Sage X3 how get a list of client running processes
The following Subprog returns into an Integer array the list of all running processes of clients
connected to X3 application server.
The Subprog needs this two local variables as parameters:
XPROCID, an Integer array in which are inserted the numbers of running processes
XNUM, an Integer which returns the count of running processes
#
#Restituisce una lista con tutti gli ID dei processi attivi sul server
#
Subprog GET_ALLPROCESS(XPROCID,XNUM)
Variable Integer XPROCID
Variable Integer XNUM
Local Char RESULT(250)(1..dim(XPROCID))
Local Integer STAT
Local Char ORDSYS(250)
Local Integer J , I, T
Local Char CHAINE(250)
Local Char PROCESS(250)
ORDSYS = "psadx -afghimnopxt -l"-GLANGUE
Call SYSTEME2(adxmac(0),ORDSYS,"",STAT,RESULT) From ORDSYS
I = 3
XNUM = 0
While I<=STAT-1
If I>=dim(RESULT) Then
Call ERREUR(mess(161,115,1)) From GESECRAN : # Trop de lignes
Break
Endif
CHAINE = RESULT(I)
PROCESS = vireblc(mid$(CHAINE,1,instr(1,CHAINE," ")),2)
If PROCESS <> "" Then
T = val(PROCESS)
If T > 0 Then
XPROCID(XNUM) = T
XNUM += 1
Endif
Endif
I += 1
Wend
End