Exchange/RJE Manual

Send/Receive Program Example
Example Programs
104698 Tandem Computers Incorporated D–5
Page 6 [1] $RJE.EXCHAPPL.RJEPROG 1991-06-17 11:05:47
CREATE^LINE^SERVER
190. 000000 0 0 !***************************************************************
191. 000000 0 0
192. 000000 0 0 PROC create^line^server;
193. 000000 1 0
194. 000000 1 0 BEGIN
195. 000000 1 1
196. 000000 1 1 ! data declarations !
197. 000000 1 1
198. 000000 1 1 INT error,
199. 000000 1 1 priority := 0,
200. 000000 1 1 new^proc^error,
201. 000000 1 1 server^ext^name[0:11] := "$RJE.SDJKRNLD.RJESV ",
202. 000013 1 1 server^int^name[0:11] := 12*[" "],
203. 000027 1 1 default[0:7] := 8*[" "],
204. 000037 1 1 startup^message := -1,
205. 000037 1 1 .iparams := @startmsg.params '>>' 1;
206. 000037 1 1
207. 000037 1 1 STRING .sp;
208. 000037 1 1
209. 000037 1 1 ! end of data declarations !
210. 000037 1 1
211. 000037 1 1 end^loop := 0;
212. 000074 1 1
213. 000074 1 1 sbuffer ':=' ["BEGIN LINE SERVER CREATION"] -> @sp;
214. 000105 1 1 write^count := @sp '-' @sbuffer;
215. 000111 1 1 CALL WRITE (term^fnum, ibuffer, write^count);
216. 000121 1 1
217. 000121 1 1 CALL FNAMEEXPAND (server^ext^name, server^int^name, default);
218. 000130 1 1
219. 000130 1 1 priority.<0> := 0; ! DEBUG bit !
220. 000133 1 1
221. 000133 1 1 CALL NEWPROCESS (server^int^name
222. 000133 1 1 , priority
223. 000133 1 1 , ! memory-pages !
224. 000133 1 1 , ! processor !
225. 000133 1 1 , server^pid
226. 000133 1 1 , new^proc^error
227. 000133 1 1 , server^proc^name);
228. 000147 1 1
229. 000147 1 1 ! Note that no user library file name is specified.
230. 000147 1 1 ! If no user library file name is specified in previous
231. 000147 1 1 ! instances of starting the line server, then the default library
232. 000147 1 1 ! RJELIB is used.
233. 000147 1 1
234. 000147 1 1 IF new^proc^error
235. 000147 1 1 THEN
236. 000151 1 1 BEGIN
237. 000151 1 2 CASE new^proc^error.<0:7>-1 OF
238. 000155 1 2 BEGIN
239. 000155 1 3
240. 000155 1 3 !0! BEGIN
241. 000155 1 CE0 sbuffer ':=' ["UNDEFINED EXTERNALS"] -> @sp;
242. 000166 1 4 write^count := @sp '-' @sbuffer;
243. 000172 1 4 END;
244. 000173 1 CE1 !1! BEGIN
245. 000173 1 4 sbuffer ':=' ["NO PCB AVAILABLE"] -> @sp;
246. 000204 1 4 write^count := @sp '-' @sbuffer;