GDSX Manual
Using Pseudo Procedures in a NonStop TS/MP
Environment
Extended General Device Support (GDSX) Manual–134303
D-23
USAMPLE2 Listing
20. ?NOLIST, Source DCCBDECS (FCB^LAYOUT)
22. ?NOLIST, Source DCCBDECS (RCB^LAYOUT)
24. !===========================================================================
25. !Comment Users may include their own file to modify DCB and LINE Templates.
26. !Comment See file ULHDECS that USAMPLE sources in here
27. ?NOLIST, Source ULHDECSE(Dcb^Template, Line^Template)
30. End Block; ! Common^Templates
31.
32. Block Config^Parms^Templates;
33. ?NOLIST, Source DCCBDECS (CONFIG^Templates)
35 End Block; ! Config^Parms^Templates
36.
37. ! Global Data
38. !
39. Block Config^Parms^DATA;
40. ?NOLIST, Source DCCBDECS (CONFIG^DATA)
42. End Block; ! Config^Parms^DATA
43.
44. Block Common^Data;
45. ?NOLIST, Source DCCBDECS (Common^Data)
47. End Block; ! Common^Data
48.
49. Block USER^PRIVATE;
50. Literal TRUE = -1,
51. FALSE = 0;
52.
53. -- the following variables are global for this GDSX-Application
54. Int .Pm^Name[0:23];
55. String .Spm^Name := @Pm^Name '<<' 1;
56. Int Pm^Name^Len;
57.
58. Int .Sc^Name^W[0:23];
59. String .Ssc^Name^W := @Sc^Name^W '<<' 1;
60. Int Sc^Name^Len^W;
61.
62. Int .Sc^Name^D[0:23];
63. String .Ssc^Name^D := @Sc^Name^D '<<' 1;
64. Int Sc^Name^Len^D;
65.
66. Int Sc^Op^Num := -1;
67. END Block; !USER^PRIVATE
68.
69. !===========================================================================
70. ! User may include System Procedures here
71 ?NOLIST, Source $System.System.Extdecs0(Debug,Numout,String_Upshift_)
75. ?NOLIST, Source PEXTGDS
77.
79. !===========================================================================
80. Proc Device^Handler(Term^File^Num, Internal^Term^No, Term^Type);
81. !===========================================================================
82. Int Term^File^Num , -- File^Num for this D^H task
83. Internal^Term^No, -- Term number for this D^H
task
84. Term^Type ; -- Terminal type
85.
86. Begin
87.
88. !===========================================================================
89. ! USCODE can declare desired DEVICE^HANDLER Local Variables here
90. !===========================================================================
91.
92. Int .EXT My^Dcb (Dcb^TEMPLATE); -- internal tables we might
need
93. Int .EXT Rcv^Iocb (Iocb^TEMPLATE); --"--
94. Int .EXT Term^Iocb (Iocb^TEMPLATE); --"--
95. Int .EXT My^Tcb (Tcb^TEMPLATE); --"--
96.
97. Int .EXT Term^Buf := 0D; -- various buffers
98. String .EXT S^Term^Buf = Term^Buf; --"--
99. Int .EXT Rcv^Buf := 0D; --"--
100. String .EXT S^Rcv^Buf = Rcv^Buf; --"--
101. Int .EXT Work^Buf := 0D; --"--
102. String .EXT S^Work^Buf = Work^Buf; --"--
103.