Exchange/RJE Manual
Send/Receive Program Example
Example Programs
D–4 104698 Tandem Computers Incorporated
Page 4 [1] $RJE.EXCHAPPL.RJEPROG 1991-06-17 11:05:47
PROC START^IT
132. 000000 0 0
133. 000000 0 0 !***************************************************************
134. 000000 0 0
135. 000000 0 0 PROC start^it;
136. 000000 1 0
137. 000000 1 0 BEGIN
138. 000000 1 1
139. 000000 1 1 ! open $RECEIVE !
140. 000000 1 1 CALL OPEN (recv^name, recv^fnum, recv^flags);
141. 000011 1 1 IF <
142. 000011 1 1 THEN
143. 000012 1 1 BEGIN
144. 000012 1 2 CALL FILEINFO (recv^fnum, error);
145. 000023 1 2 CALL DEBUG;
146. 000024 1 2 END;
147. 000024 1 1
148. 000024 1 1 ! read $RECEIVE !
149. 000024 1 1 CALL READ (recv^fnum, startmsg, $LEN(startmsg));
150. 000034 1 1 CALL AWAITIO (recv^fnum
151. 000034 1 1 ,
152. 000034 1 1 ,
153. 000034 1 1 ,
154. 000034 1 1 , time^limit1);
155. 000043 1 1 IF <>
156. 000043 1 1 THEN
157. 000044 1 1 BEGIN
158. 000044 1 2 CALL FILEINFO (recv^fnum, error);
159. 000055 1 2 CALL DEBUG;
160. 000056 1 2 END;
161. 000056 1 1
162. 000056 1 1 END; ! end proc start^it !
Page 5 [1] $RJE.EXCHAPPL.RJEPROG 1991-06-17 11:05:47
PROC END^IT^ALL
164. 000000 0 0 !***************************************************************
165. 000000 0 0
166. 000000 0 0 PROC end^it^all (message, length, line^server^fnum) VARIABLE;
167. 000000 1 0
168. 000000 1 0 INT .message,
169. 000000 1 0 length,
170. 000000 1 0 line^server^fnum;
171. 000000 1 0
172. 000000 1 0 BEGIN
173. 000000 1 1
174. 000000 1 1
175. 000000 1 1 CALL WRITE (term^fnum, message, length);
176. 000010 1 1 IF <>
177. 000010 1 1 THEN
178. 000011 1 1 BEGIN
179. 000011 1 2 CALL FILEINFO (term^fnum, error);
180. 000022 1 2 CALL DEBUG;
181. 000023 1 2 END;
182. 000023 1 1
183. 000023 1 1 ! disconnect the comm line !
184. 000023 1 1 CALL CONTROL (line^server^fnum, disconnect^line);
185. 000032 1 1
186. 000032 1 1 CALL CLOSE (line^server^fnum);
187. 000037 1 1
188. 000037 1 1 END; ! end proc end^it^all !