GDSX Manual

Using Pseudo Procedures in a NonStop TS/MP
Environment
Extended General Device Support (GDSX) Manual134303
D-25
USAMPLE2 Listing
177. End;
178.
179. If Not $Numeric(S^Term^Buf[1]) Or
180. Not $Numeric(S^Term^Buf[2]) Or
181. Not $Numeric(S^Term^Buf[3]) Then Begin
182. Term^Buf ':=' "loop-counter (nnn) is not numeric " &
183. Term^Buf[17] For 28 Bytes;
184. Return 0;
185. End;
186.
187. -- everything is OK
188. Return 1;
189. End;
190.
191.
193. !===========================================================================
194. SubProc Call^Pathsend;
195. !===========================================================================
196. !
197. Begin
198. If PROC^NOWAIT Then Begin
199. If S^Term^Buf[0] = ["W"] Then Begin
200. -- we do a nowaited ^SERVERCLASS_SEND_ to the write server
201. Ferr := ^Serverclass_Send_ (Spm^Name,
202. Pm^Name^Len,
203. Ssc^Name^W,
204. Sc^Name^Len^W,
205. S^Rcv^Buf,
206. 62,
207. 62,
208. ,
209. ,
210. 1,
211. Sc^Op^Num);
212. End
213. Else Begin
214. -- we do a nowaited ^SERVERCLASS_SEND_ to the delete server
215. Ferr := ^Serverclass_Send_ (Spm^Name,
216. Pm^Name^Len,
217. Ssc^Name^D,
218. Sc^Name^Len^D,
219. S^Rcv^Buf,
220. 62,
221. 62,
222. ,
223. ,
224. 1,
225. Sc^Op^Num);
226. End;
227.
228. If Not Ferr Then Begin
229. -- wait for the completion of the ^SERVERCLASS_SEND_
230. Call ^AwaitioX (Sc^Op^Num, @Rcv^Buf, Replied^Len,, -1D);
231. If <> Then
232. -- set the error (error handling is done in the calling procedure)
233. Call ^Fileinfo (Sc^Op^Num, Ferr);
234. End;
235. End
236. Else Begin
237. If S^Term^Buf[0] = ["W"] Then Begin
238. -- we do a waited ^SERVERCLASS_SEND_ to the write server
239. Ferr := ^Serverclass_Send_ (Spm^Name,
240. Pm^Name^Len,
241. Ssc^Name^W,
242. Sc^Name^Len^W,
243. S^RCV^Buf,
244. 62,
245. 62,
246. Replied^Len);
247. End
248. Else Begin
249. -- we do a waited ^SERVERCLASS_SEND_ to the delete server
250. Ferr := ^Serverclass_Send_ (Spm^Name,