Exchange/RJE Manual
Appendix D Example Programs
104698 Tandem Computers Incorporated D–1
This appendix presents two example programs: one showing the programmatic
interface, the other an example user-exit procedure.
Send/Receive Program
Example
This example program sends and receives a job using the programmatic interface. It
assumes that Exchange/RJE is communicating over a nonswitched (leased) data
communications line with an IBM host system that is running OS/MVS and JES2.
Page 1 [1] $RJE.EXCHAPPL.RJEPROG 1991-06-17 11:05:47
TAL - T9250C30 - (01DEC90)
Copyright Tandem Computers Incorporated 1976, 1978, 1981-83, 1985, 1987-90
1. 000000 0 0 ?NOCODE,NOMAP,NOLMAP *
2. 000000 0 0 ?INSPECT,SYMBOLS
3. 000000 0 0
4. 000000 0 0 !****************************************************************************!
5. 000000 0 0 ! !
6. 000000 0 0 ! EXCHANGE/RJE PROGRAMMATIC EXAMPLE DATE 06/15/91 !
7. 000000 0 0 ! !
8. 000000 0 0 ! THIS EXAMPLE PROGRAM STARTS THE EXCHANGE/RJE LINE SERVER, SENDS A "DO !
9. 000000 0 0 ! NOTHING" JOB TO AN IBM HOST SYSTEM, AND RECEIVES A PRINT FILE FROM THE !
10. 000000 0 0 ! IBM HOST SYSTEM. !
11. 000000 0 0 ! !
12. 000000 0 0 ! TO RUN, ENTER THE FOLLOWING: !
13. 000000 0 0 ! !
14. 000000 0 0 ! RUN objname /IN $line/ !
15. 000000 0 0 ! !
16. 000000 0 0 ! WHERE objname IS THE NAME OF THE OBJECT FILE !
17. 000000 0 0 ! $line IS THE NAME OF THE DATA-COMMUNICATIONS LINE !
18. 000000 0 0 ! !
19. 000000 0 0 !****************************************************************************!
20. 000000 0 0
21. 000000 0 0 ! Global declarations !
22. 000000 0 0
23. 000000 0 0 INT .term^name[0:11] := [12*[" "]],
24. 000014 0 0 term^fnum,
25. 000014 0 0 .recv^name[0:11] := ["$RECEIVE", 8*[" "]],
26. 000030 0 0 recv^fnum := -1;
27. 000030 0 0 LITERAL recv^flags = 1;
28. 000030 0 0
29. 000030 0 0 INT .ibuffer[0:169];
30. 000302 0 0 STRING .sbuffer := @ibuffer '<<' 1,
31. 000302 0 0 .sp;
32. 000302 0 0
33. 000302 0 0 INT .server^pid[0:3],
34. 000306 0 0 .server^proc^name[0:2] := ["$LNSRV"], ! LINE SERVER NAME !
35. 000311 0 0 .server^open^name[0:11],
36. 000325 0 0 server^fnum := -1;
37. 000325 0 0
38. 000325 0 0 INT(32) delay^time := 100D; ! 100 msec
39. 000325 0 0
40. 000325 0 0 INT end^loop,
41. 000325 0 0 write^count,
42. 000325 0 0 read^count := 80,
43. 000325 0 0 count^read,
44. 000325 0 0 retry^count := 0,
45. 000325 0 0 error;
46. 000325 0 0
47. 000325 0 0 INT (32) time^limit1 := 3000D;
48. 000325 0 0
50. 000325 0 0 LITERAL function^41 = 41, ! SETMODE function definitions
51. 000325 0 0 function^42 = 42,
52. 000325 0 0 function^43 = 43,
53. 000325 0 0 function^44 = 44,
54. 000325 0 0 function^45 = 45,