SNAX/CNM Manual
 SAMPLE PROGRAM: SENDING REQMS AND RECEIVING RECFMS RUS
 !check the file-system/CNM reply
 Call Awaitio(Out^File^Number,,Read^Cnt,Temp^Tag);
 If <> Then
 Begin
 ! Handle Error
 End;
 If Cs^Frame.Vr^Indicator.
8:15
 = 1 Then
 Begin
 ! Handle Negative Reply
 End;
 If Cs^Frame.Comp^Func.
8:15
 <> Cs^Reply^Statistics Then
 Begin
 ! Handle Error
 End;
 ! Etc...
 ! Disconnect
 Nm^Frame.Vr^Indicator := 0;
 Nm^Frame.Comp^Func.
0:7
 := 0; !component $SSCP
 Nm^Frame.Comp^Func.
8:15
 := 2; !disconnect function
 Nm^Frame.Line^Nm^Name ':=' "#CNMAPPL"; !appl Name
 Nm^Frame.Pu^Nm^Name ':=' "PASS "; !appl Password
 Write^Cnt := Read^Cnt := 34;
 Tag := Tag + 1d;
 Call Writeread(Out^File^Number,Nm^Frame,Write^Cnt,
 Read^Cnt,,Tag);
 !check REPLY^DISCONNECT and clear a saved 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 Negative Reply
 End;
 Save^Connect^Id := 0;
 !Close (or connect again)
 Call Close(Out^File^Number);
 End;
 ?nomap
 A-8










