SNAX/CNM Manual
 SAMPLE PROGRAM: SENDING REQMS AND RECEIVING RECFMS RUS
 ! send VERB^CONNECT
 Nm^Frame.Vr^Indicator := 0;
 Nm^Frame.Comp^Func.
0:7
 := 0; !component $SSCP
 Nm^Frame.Comp^Func.
8:15
 := 1; !connect function
 Nm^Frame.Line^Nm^Name ':=' "#CNMAPPL"; !appl Name
 Nm^Frame.Pu^Nm^Name ':=' "PASS "; !appl Password
 Write^Cnt := Read^Cnt := 34;
 Tag := 1d;
 Call Writeread(Out^File^Number,Nm^Frame,Write^Cnt,
 Read^Cnt,,Tag);
 ! check the REPLY^CONNECT and save a CONNECT ID
 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 A Negative Reply
 End
 Else
 Begin
 Save^Connect^Id := Nm^Frame.Connect^Id;
 ! Process A Positive Reply
 End;
 ! Send and receive REQMS, RECFMS ,Statistics, etc.
 ! Tags provide a way of keeping track of requests.
 ! In this example an application will send a REQMS
 ! to a device and will receive a RECFMS from a device.
 ! Send Req REQMS
 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^Send^Req;
 Nm^Frame.Line^Nm^Name ':=' ["$SNALUP "];
 Nm^Frame.Pu^Nm^Name ':=' ["#PU "];
 Nm^Frame.Object := Pi^Pu;
 Nm^Frame.Nm^Data^String[6]':=' Reqms02 For 11;
 Write^Cnt := Read^Cnt := (34 + 11 + 6 );
 Tag := Tag + 1d;
 Call Writeread(Out^File^Number,Nm^Frame,Write^Cnt,
 Read^Cnt,,Tag);
 A-5










