SNAX/CNM Manual
 SAMPLE PROGRAM: SENDING AND RECEIVING NMVT RUS
 Call Awaitio(Out^File^Number,,Read^Cnt,Temp^Tag);
 If <> Then
 Begin
 ! Handle Error
 End;
 If Nm^Frame.Vr^Indicator.
8:15
 = 1 Then
 Begin
 ! Handle Error
 End;
 If Nm^Frame.Comp^Func.
8:15
 <> Nm^Reply^Send^Req Then
 Begin
 ! Handle Error
 End;
 ! receive NMVT reply
 Nm^Frame.Vr^Indicator := 0;
 Nm^Frame.Comp^Func.
0:7
 := 2; !component cnm
 Nm^Frame.Comp^Func.
8:15
 := Nm^Verb^Accept;
 Write^Cnt := 34;
 Read^Cnt := (34 + 26 + 6 ); !nm^Header + Rh_ru + Th
 Tag := Tag + 1d;
 Call Writeread(Out^File^Number,Nm^Frame,Write^Cnt,
 Read^Cnt,,Tag);
 ! check the file-system/CNM reply
 Call Awaitio(Out^File^Number,,Read^Cnt,Temp^Tag);
 If <> Then
 Begin
 ! Handle Error
 End;
 If Nm^Frame.Vr^Indicator.
8:15
 = 1 Then
 Begin
 ! Handle Negative Reply
 End;
 If Nm^Frame.Comp^Func.
8:15
 <> Nm^Rcv^Ms Then
 Begin
 ! Handle Error
 End;
 ! send +rsp(NMVT)
 Nm^Frame.Vr^Indicator := 0;
 Nm^Frame.Connect^Id := Save^Connect^Id;
 Nm^Frame.Comp^Func.
0:7
 := 2; !component cnm
 Nm^Frame.Comp^Func.
8:15
 := Nm^Verb^Ack^Rcv^Ms;
 Nm^Frame.Line^Nm^Name ':=' ["$SNALUP "];
 Nm^Frame.Pu^Nm^Name ':=' ["#PU "];
 Nm^Frame.Object := Pi^Pu;
 Nm^Frame.Nm^Data^String[6]':=' NMVTpos For 6;
 Write^Cnt := Read^Cnt := (34 + 6 + 6 );
 B-6










