ASAP 2.7 Extension Manual

Implementing the ASAP Extension in an Application
HP NonStop ASAP Extension Manual425265-004
4-19
ASAP_UPDATELIST_ Procedure
.
.
state := get^my^state; !get my state
data^item := 3; !set to state
value := $fix(state); !convert to fixed
if updates then
if (error := ASAP_UPDATE_ ( seg^offset
,!error^detrail!
,data^item
,value
,1 )) <> 0 then call report^error;
Example 4 – Update Many
int(32) seg^offset;
int error, data^item, state;
string domain^name[0:63];
fixed value;
struct .list(asap^list^def);
.
.
.
if (error := ASAP_REGISTER_…
.
.
.
for i := 0 to 11 do begin
list.idx[i].data^item := i;
list.idx[i].value := get^value(i);
list.idx[i].math := 0;
end;
if updates then
if(error := ASAP_UPDATELIST( seg^offset
,!error^detail!
,12
,list )) <> 0 then call report^error;