Envoy Application Programming Manual

Table Of Contents
TINET Multipoint Supervisor Protocol
Envoy Application Programming Manual427159-001
8-42
Steps of Example Program
Example 8-15. Program Code for TINET Multipoint Supervisor (Page 10 of 13)
IF invalid^expdate THEN
BEGIN
expdate := 0;
sp ’:=’ [ wtm^expdate^lcfl ] -> @sp;
END;
IF invalid^refnum THEN
BEGIN
refnum := 0;
sp ’:=’ [ wtm^refnum^lcfl ] -> @sp;
END;
IF invalid^trancode THEN
BEGIN
trancode := 0;
sp ’:=’ [ wtm^trancode^lcfl ] -> @sp;
END;
IF invalid^amount THEN
BEGIN
amount := 0;
sp ’:=’ [ wtm^amount^lcfl ] -> @sp;
END;
END ! partial write tutorial.
ELSE
BEGIN ! display credit check result.
! format beginning of display message.
sout^buffer :=’ [ STX, w^id, w^seq, wdata^cc,
wdata^valid^wcc, sf ] -> @sp;
! format display message.
CASE check^done OF
BEGIN
! 0 = ok.
! Display "credit ok" id light and
! authorization number.
sp ’:=’ wdata^ok^lc & message FOR
message^len -> @sp;
! 1 = not ok.
! Display "credit denied" id light.
sp := wdata^nok^lc; @sp := @sp[1];
! 2 = pick up card.
! Display "pick up card" id light.
sp := wdata^puc^lc; @sp := @sp[1];
! 3 = call center.
! Display "call center" id light and
! phone number.
sp ’:=’ wdata^call^lc &
message FOR message^len -> @sp;
END;