Sei sulla pagina 1di 4

Autonomic computing examples

These examples illustrate autonomic computing


capabilities associated with the REXX SPOC API.
Autonomic indicates that the code is responsive
and can take certain actions to correct what it
determines to be incorrect.

https://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=%2Fcom.ibm.ims11.doc.spr%2Fims_autonomic.htm
Autonomic example 1
In the following example, a transaction is queried. If the transaction is stopped, the REXX SPOC API attempts to
start it. The REXX SPOC API examines the information returned by CSLULGTS, looking specifically for the line
that refers to the transaction of interest.
/* autonomic computing example 1 */
"CART qrytran12"
"qry tran name(CDEBTRN3) show(status)"
results = cslulgts("resp.","qrytran12","3:15")

Do idx = 1 to resp.0
/* find which IMS and the status of tran */
parse var resp.idx . "TRAN(CDEBTRN3" . ,
"MBR(" imsname ")" . ,
"LSTT(" status ")" .

/* if tran is stoppped, try to start it */


If pos('STOSCHD', status) > 0 Then
Do
/* send command to IMS that needs to restart tran */
"ROUTE" imsname
"UPD TRAN NAME(CDEBTRN3) START(SCHD)"
End
End
Autonomic example 2
In the following example, the QUERY command is used to determine the queue count (qcnt) of a transaction. A
qcnt with a value greater than 5 is considered a problem. The REXX SPOC API attempts to resolve the problem
by starting another region and changing the transaction to a different class.
/* autonomic computing example 2 */
"CART qrytran13"
"qry tran name(sks1) show(qcnt)"
results = cslulgts("resp.", "qrytran13", "3:15")
Do idx = 1 to resp.0
parse var resp.idx . "TRAN(SKS1" . "Q(" count ")" .
If count ¬= '' &,
count > 5 Then
Do
"CART strtrgn05"
"START REGION IMSRG5"
start? = cslulgts("strt.", "strtrgn05", "10:00")
if imsrc = '00000000X' then
Do
"CART updtran14"
"update tran name(SKS1) set(class(5))"
End
End
End
"END"
Autonomic Computing has emerged as
a paradigm for self managing IT systems to stem the
tide of rapidly increasing administration costs in the
face of rising IT system complexity. The
development of self managing systems posses
special challenges to research and development
teams. Examples from IBM's DB2 UDB Autonomic
Computing project will be used as to highlight
recent successes illustrating software engineering
principles, algorithmic/ mathematical techniques
such as on-line simulation and close loop adaptive
control, and experimental results.

Potrebbero piacerti anche