Exchange/SNA Manual
Console Program Example
Example Programs
104700 Tandem Computers Incorporated E–13
Page 2 [1] $RJE.EXCHAPPL.CONSRC 1991-05-29 13:38:20
EXCHANGE/SNA CONSOLE APPLICATION EXAMPLE
49. 000000 0 0 ! To run, start a named line server from the Exchange/SNA command interpreter !
50. 000000 0 0 ! (RJECIS). Then run this program, supplying the name of the line server !
51. 000000 0 0 ! console subdevice in the command line as show below: !
52. 000000 0 0 ! !
53. 000000 0 0 ! RUN <objname> <console-name> !
54. 000000 0 0 ! !
55. 000000 0 0 ! <objname> is the name of this program. <console-name> is the name of the !
56. 000000 0 0 ! console subdevice of the line server that you want to use. For example, !
57. 000000 0 0 ! to use the console subdevice of a line server name $SNA1, you would enter !
58. 000000 0 0 ! $SNA1.#CN for the name of the console subdevice. !
59. 000000 0 0 !****************************************************************************!
60. 000000 0 0
61. 000000 0 0
62. 000000 0 0 ! OPEN FLAG LITERALS !
63. 000000 0 0
64. 000000 0 0 LITERAL nowait^1^out = 1; ! Flag value for nowait I/O with
65. 000000 0 0 ! one outstanding I/O operation
66. 000000 0 0
67. 000000 0 0
68. 000000 0 0 ! $RECEIVE DECLARATIONS !
69. 000000 0 0
70. 000000 0 0 INT .recv^name[0:11] := ["$RECEIVE", 8*[" "]],
71. 000014 0 0 recv^fnum := -1;
72. 000014 0 0
73. 000014 0 0
74. 000014 0 0 ! TERMINAL DECLARATIONS !
75. 000014 0 0
76. 000014 0 0 INT .term^name[0:11] := [12*[" "]],
77. 000030 0 0 term^fnum := -1;
78. 000030 0 0
79. 000030 0 0 INT .ibuf^term[0:39], ! Buffer for terminal I/O
80. 000100 0 0 term^out^cnt,
81. 000100 0 0 term^in^cnt := 80,
82. 000100 0 0 prompt^cnt;
83. 000100 0 0
84. 000100 0 0 STRING .sbuf^term := @ibuf^term '<<' 1,
85. 000100 0 0 .sp^term;
86. 000100 0 0
87. 000100 0 0
88. 000100 0 0 ! CONSOLE DECLARATIONS !
89. 000100 0 0
90. 000100 0 0 INT .server^file^name[0:11], ! EXCHANGE/SNA line server name
91. 000114 0 0 cons^fnum := -1;
92. 000114 0 0
93. 000114 0 0 INT .ibuf^cons[-1:39], ! Buffer for console I/O
94. 000165 0 0 cons^cnt,
95. 000165 0 0 cons^cnt^out := 80;
96. 000165 0 0
97. 000165 0 0 STRING .sbuf^cons := @ibuf^cons '<<' 1,
98. 000165 0 0 .sp^cons;