SNAX/CNM Manual
 SAMPLE PROGRAM: SENDING REQMS AND RECEIVING RECFMS RUS
 ! send +rsp(RECFMS)
 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]':=' Recfmspos2 For 6;
 Write^Cnt := Read^Cnt := (34 + 6 + 6 );
 Tag := Tag + 1d;
 Call Writeread(Out^File^Number,Nm^Frame,Write^Cnt,
 Read^Cnt,,Tag);
 ! check the reply and its embedded SNA response
 Call Awaitio(Out^File^Number,,Read^Cnt,Temp^Tag);
 If <> Then
 Begin
 ! Handle Error
 End;
 If Read^Cnt Then
 Begin
 ! Check what it is - may be a REQMS or RECFMS Type 0
 End
 Else
 Begin
 ! It's O.K., SNA response was sent and there
 ! was no SNA request to be passed to the
 ! application
 End;
 ! Obtain^Line^Statistics (and reset counters)
 Cs^Frame.Vr^Indicator := 0;
 Cs^Frame.Connect^Id := Save^Connect^Id;
 Cs^Frame.Comp^Func.
0:7
 := 3; !component cs
 Cs^Frame.Comp^Func.
8:15
 := Cs^Verb^Statistics;
 Cs^Frame.Line^Cs^Name ':=' ["$SNALUP "];
 Cs^Frame.Pu^Cs^Name ':=' [" "];
 Cs^Frame.Object := Pi^Line;
 Cs^Frame.Cs^Data^Words := 1; !do Reset
 Write^Cnt := (34 + 2);
 Read^Cnt := (34 + 2) + Line^Sts^Length;
 Tag := Tag + 1d;
 Call Writeread(Out^File^Number,Cs^Frame,Write^Cnt,
 Read^Cnt,,Tag);
 A-7










