GDSX Manual
Using Pseudo Procedures in a NonStop TS/MP 
Environment
Extended General Device Support (GDSX) Manual–134303
D-27
USAMPLE2 Listing
 328.     S^Term^Buf[35] ':=' Ascii^Result for 3 Bytes;
 329.     -- write the response from the server to our device
 330.     Call ^WriteReadX(Term^File^Num, Term^Buf, 50, 62);
 331.    End
 332.    Else Begin
 333.     -- ^SERVERCLASS_SEND_ reported no error
 334.     -- let's end this transaction
 335.     Ferr := ^Endtransaction;
 336.     If Ferr Then
 337.     -- we have an error with ^ENDTRANSACTION - let's die
 338.     Call Debug;
 339.     -- move the buffer that we received from ^SERVERCLASS_SEND_
 340.     -- to the Terminal^Buffer
 341.     Term^Buf ':=' Rcv^Buf[1] For 60 Bytes;
 342.     -- write the response from the server to our device
 343.     Call ^WriteReadX(Term^File^Num, Term^Buf, 50, 62);
 344.    End;
 345.   End
 346.   Else Begin
 347.    -- wuffer did not pass our checks
 348.    -- Write the error message and let the user retry
 349.    Call ^WriteReadX(Term^File^Num, Term^Buf, 50, 62);
 350.   End;
 351.   End;
 352. 
 353.  E^Stop ->   -- task is stopping
 354.   Call Stop^Task;
 355.  End;     -- of Case Evt
 356. End;     -- of While
 357. 
 358. End;      -- Proc
 359. 
 360. !===========================================================================
 361 Proc USER^INITIALIZE
 362. !===========================================================================
 363. Proc User^Initialize(Primary);
 364. Int primary;
 365. 
 36  Begin
 367. -- initialize our global variables
 368. Pm^Name  ':=' ["$PWGDS"];
 369.  Pm^Name^Len  := 6;
 370. Sc^Name^W  ':=' ["WRITER"];
 371.  Sc^Name^Len^W := 6;
 372. Sc^Name^D  ':=' ["DELETER"];
 373.  Sc^Name^Len^D := 7;
 374. End;
 375. 
 376. !===========================================================================
   !       Other User^Exits
 378. !===========================================================================
 379. 
 380. !===========================================================================
 381. Proc LINE^HANDLER (LINE^FILE^NUM, INTERNAL^LINE^NO, IN^QUEUE^FILE^NUM);
 382. !===========================================================================
 383. Int LINE^FILE^NUM, INTERNAL^LINE^NO, IN^QUEUE^FILE^NUM;
 384. Begin
 385. 
 386. End;
 387. 
 388. 
 389. !===========================================================================
 390. Int Proc USER^START (DCBP, OPENID);
 391. !===========================================================================
 392. Int .EXT DCBP;               
!gdsx
 393. Int (32) .OPENID;               
!gdsx
 394.  Begin    ! OPENID specified by USER (In this case, pointer to DCB)
 395.     ! is stored in TCB.OPENID
 396.  OPENID := @DCBP;
 397.  Return 0;
 398. End;
 399. 










