Exchange/SNA Manual

Console Program Example
Example Programs
104700 Tandem Computers Incorporated E–19
Page 8 [1] $RJE.EXCHAPPL.CONSRC 1991-05-29 13:38:20
EXCHANGE/SNA CONSOLE APPLICATION EXAMPLE
395. 000121 1 3 ! Set up console output for writing to terminal
396. 000121 1 3 IF await^count < prompt^cnt
397. 000121 1 3 THEN ! Too short to cover the whole prompt - pad with blanks
398. 000125 1 3 BEGIN
399. 000125 1 4 sbuf^cons[await^count] ':=' [" "] &
400. 000125 1 4 sbuf^cons[await^count] FOR prompt^cnt - await^count - 1;
401. 000144 1 4 await^count := prompt^cnt;
402. 000146 1 4 END;
403. 000146 1 3 ibuf^cons[-1] := cr;
404. 000151 1 3 term^out^cnt := await^count + 2;
405. 000154 1 3 ! Write the console output to the terminal
406. 000154 1 3 CALL WRITE (term^fnum, ibuf^cons[-1], term^out^cnt);
409. 000165 1 3 IF <> THEN CALL DEBUG;
410. 000167 1 3 CALL AWAITIO (term^fnum);
411. 000175 1 3 IF <> THEN CALL DEBUG;
412. 000177 1 3 ! Reset the terminal attributes
413. 000177 1 3 CALL SETMODE (term^fnum, auto^line^feed, lfsys);
416. 000206 1 3 IF <> THEN CALL DEBUG;
417. 000210 1 3 END ! End of console I/O completed
418. 000210 1 2 ELSE
419. 000211 1 2 CALL DEBUG;
420. 000212 1 2
421. 000212 1 2 END UNTIL end^loop; ! End of loop
422. 000214 1 1
423. 000214 1 1 CALL CLOSE (cons^fnum);
424. 000221 1 1 CALL CLOSE (term^fnum);
425. 000226 1 1
426. 000226 1 1 END;
Page 9 [1] $RJE.EXCHAPPL.CONSRC 1991-05-29 13:38:20
BINDER AND COMPILER STATISTICS
BINDER - OBJECT FILE BINDER - T9621C20 - (31DEC90) SYSTEM \SNAX
Copyright Tandem Computers Incorporated 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989, 1990
Object file $RJE.EXCHAPPL.console
TIMESTAMP 1991-05-29 13:38:20
1 Code page
24 Primary data words
190 Secondary data words
2 Data pages
0 Resident code pages
0 Extended data pages
214 Top of stack location in words
1 Code segment
0 Binder Warnings
0 Binder Errors
TAL - Transaction Application Language - T9250C30 - (01DEC90)
Number of compiler errors = 0
Number of unsuppressed compiler warnings = 0
Number of warnings suppressed by NOWARN = 0
Maximum symbol table space used was = 24288 bytes
Number of source lines = 6449
Compile cpu time = 00:00:01
Total Elapsed time = 00:00:19