home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / dec20 / k20mit.mss < prev    next >
Text File  |  2020-01-01  |  80KB  |  1,793 lines

  1. @part(20KERMIT,root="kuser")
  2. @string{-20version="@q<5.1(263)>"}
  3. @Chapter<DECSYSTEM-20 KERMIT>
  4. @label<-k20>
  5. @Index[TOPS-20]
  6. @Index[DECSYSTEM-20]
  7. @begin<description,leftmargin +12,indent -12,spread 0>
  8. @i(Authors:)@\Frank da@ Cruz, Bill Catchings, Columbia University
  9.  
  10. @i(Language:)@\MACRO-20
  11.  
  12. @i(Version:)@\@value(-20version)
  13.  
  14. @i(Date:)@\January 2001
  15. @end<description>
  16.  
  17. @subheading<Kermit-20 Capabilities At a Glance:>
  18. @begin<format,leftmargin +2,above 1,below 1>
  19. @tabclear()@tabset(3.5inches,4.0inches)
  20. Local operation:@\Yes
  21. Remote operation:@\Yes
  22. Transfers text files:@\Yes
  23. Transfers binary files:@\Yes
  24. Wildcard send:@\Yes
  25. @q<^X/^Y> interruption:@\Yes
  26. Filename collision avoidance:@\Yes
  27. Timeouts:@\Yes 
  28. 8th-bit prefixing:@\Yes
  29. Repeat character compression:@\Yes
  30. Alternate block check types:@\Yes
  31. Communication settings:@\Yes
  32. Transmit BREAK:@\Yes 
  33. IBM mainframe communication:@\Yes
  34. Transaction logging:@\Yes
  35. Session logging:@\Yes
  36. Debug logging:@\Yes
  37. Raw transmit:@\Yes
  38. Login scripts:@\Yes
  39. Act as server:@\Yes
  40. Talk to server:@\Yes
  41. Advanced commands for servers:@\Yes
  42. Local file management:@\Yes
  43. Command/init files:@\Yes
  44. Long packets:@\Yes
  45. Sliding windows:@\No
  46. Handle file attributes:@\No
  47. @end<format>
  48.  
  49. Kermit-20 is a program that implements the Kermit file transfer protocol for
  50. the Digital Equipment Corporation DECSYSTEM-20 mainframe computer.  It is
  51. written in MACRO-20 assembly language and should run on any DEC-20 system
  52. with version 4 of TOPS-20 or later.
  53.  
  54. The Kermit-20 section will describe the things you should know about the DEC-20
  55. file system in order to make effective use of Kermit, and then it will describe
  56. the special features of the Kermit-20 program.
  57.  
  58. @Section<The DEC-20 File System>
  59.  
  60. The features of the DEC-20 file system of greatest interest to Kermit users are
  61. the form of the file specifications, and the distinctions between text and
  62. binary files.
  63.  
  64. @Subheading<DEC-20 File Specifications>
  65.  
  66. DEC-20 file specifications are of the form
  67. @example(DEVICE:<DIRECTORY>NAME.TYPE.GEN;ATTRIBUTES)
  68. where the DIRECTORY, NAME, and TYPE may each be up to 39 characters in length,
  69. GEN is a generation (version number), and various attributes are possible
  70. (protection code, account, temporary, etc).  Generation and attributes are
  71. normally omitted.  Device and directory, when omitted, default to the user's
  72. own (or "connected") disk and directory.  Thus @q<NAME.TYPE> is normally
  73. sufficient to specify a file, and only this information is sent along by
  74. Kermit-20 with an outgoing file.
  75.  
  76. The device, directory, name, and type fields may contain uppercase letters,
  77. digits, and the special characters "@q<->" (dash), "@q<_>" (underscore), and
  78. "@q<$>" (dollar sign).  There are no imbedded or trailing spaces.  Other
  79. characters may be included by prefixing them (each) with a Control-V.  The
  80. fields of the file specification are set off from one another by the
  81. punctuation indicated above.
  82.  
  83. The device field specifies a physical or "logical" device upon which the file
  84. is resident.  The directory field indicates the area on the device, for
  85. instance the area belonging to the owner of the file.  Kermit-20 does not
  86. transmit the device or directory fields to the target system, and does not
  87. attempt to honor device or directory fields that may appear in incoming file
  88. names; for instance, it will not create new directories.
  89.  
  90. The name is the primary identifier for the file.  The type, also called the
  91. "extension", is an indicator which, by convention, tells what kind of file we
  92. have.  For instance @q<FOO.FOR> is the source of a Fortran program named FOO;
  93. @q<FOO.REL> might be the relocatable object module produced by compiling
  94. @q<FOO.FOR>; @q<FOO.EXE> could an executable program produced by LOADing
  95. and SAVing @q<FOO.REL>, and so forth.
  96.  
  97. @index<Wildcard>
  98. The DEC-20 allows a group of files to be specified in a single file
  99. specification by including the special "wildcard" characters, "@q<*>" and
  100. "@q<%>".  A "@q<*>" matches any string of characters, including no characters
  101. at all; a "@q<%>" matches any single character.  Here are some examples:
  102. @Begin(Description,spread 0.5,leftmargin +8, indent -8)
  103. @q<*.FOR>@\All files of type @q<FOR> (all Fortran source files) in the
  104. connected directory.
  105.     
  106. @q<FOO.*>@\Files of all types with name @q<FOO>.
  107.     
  108. @q<F*.*>@\All files whose names start with F.
  109.  
  110. @q<F*X*.*>@\All files whose names start with F and contain at least one X.
  111.  
  112. @q<%.*>@\All files whose names are exactly one character long.
  113.  
  114. @q<*.%%%*>@\All files whose types are at least three characters long.
  115. @End(Description)
  116. Wildcard notation is used on many computer systems in similar ways, and it is
  117. the mechanism most commonly used to instruct Kermit to send a group of files.
  118.  
  119. @heading<Text Files and Binary Files>
  120.  
  121. The DEC-20, like most computers, has a file system with its own peculiarities.
  122. Like many other systems, the DEC-20 makes a distinction between @i<text files>
  123. and @i<binary files>.  Text files are generally those composed only of printing
  124. characters (letters, digits, and punctuation) and "carriage control" characters
  125. (carriage return, line feed, form feed, tab).  Text files are designed to be
  126. read by people.  Binary files are designed to be read by a computer program,
  127. and may have any contents at all.  If you use the DEC-20 TYPE command to
  128. display a text file on your terminal, the result will be intelligible.  If you
  129. type a binary file on your terminal, you will probably see mainly gibberish.
  130. You can not always tell a text file from a binary file by its name or directory
  131. information, though in general files with types like @q<.TXT>, @q<.DOC>,
  132. @q<.HLP> are textual (as are "source files" for computer programs like text
  133. formatters and programming language compilers), and files with types like
  134. @q<.EXE>, @q<.REL>, @q<.BIN> are binary.
  135.  
  136. The DEC-20 has an unusual word size, 36 bits.  It differs from most other
  137. systems by storing text in 7-bit, rather than 8-bit, bytes.  Since text is
  138. encoded in the 7-bit ASCII character set, this allows more efficient use of
  139. storage.  However, the word size is not a multiple of the normal byte size.
  140. The DEC-20 therefore stores five 7-bit characters per word, with one bit left
  141. over. 
  142.     
  143. It is also possible to store files with other byte sizes.  The common layouts
  144. of bytes within a word are shown in Figure @ref<-20bsfig>.
  145. @begin(figure)
  146. @bar()
  147. @blankspace(1)
  148. @Begin(Description,leftmargin +8,indent -4,group)
  149. @ @u(7):@\Text Files: Five 7-bit bytes per word.
  150. @Begin(Example,leftmargin +1)
  151. +------+------+------+------+------++
  152. |      |      |      |      |      ||
  153. +------+------+------+------+------++
  154. 0      7      14     21     28     35
  155. @End(Example)
  156. Normally, bit 35 is unused and set to zero.  However, in EDIT (or SOS, or OTTO)
  157. line-@|numbered files, bit 35 is set to 1 when the word contains a line number.
  158. @End(Description)
  159.  
  160. @Begin(Description,leftmargin +8,indent -4,group)
  161. @ @u(8):@\"Foreign" binary files:  Four 8-bit bytes per word.
  162. @Begin(Example,leftmargin +1)
  163. +-------+-------+-------+-------+---+
  164. |       |       |       |       |   |
  165. +-------+-------+-------+-------+---+
  166. 0       8       16      24      32  35
  167. @End(Example)
  168. Bits 32-35 are unused.
  169. @End(Description)
  170.  
  171. @Begin(Description,leftmargin +8,indent -4,group)
  172. @u(36):@\"Native" binary files:  One 36-bit byte per word.
  173. @Begin(Example,leftmargin +1)
  174. +-----------------------------------+
  175. |                                   |
  176. +-----------------------------------+
  177. 0                                   35
  178. @End(Example)
  179. All bits are used.
  180. @End(Description)
  181. @caption(DECSYSTEM-20 Word/Byte Organization)
  182. @tag<-20bsfig>
  183. @bar()
  184. @end(figure)
  185.  
  186. @Index[Word Size]@Index[Byte Size] The minimum unit of disk allocation on the
  187. DEC-20 is a @i<page>, 512 36-bit words, or 2560 7-bit characters, or 2048 8-bit
  188. bytes.  Any file that contains at least one bit of information occupies at
  189. least a full page on the disk.  The directory information for a file includes
  190. the number of pages occupied on the disk, the bytesize of the file, and the
  191. number of bytes of that size which are in the file.  This information can be
  192. seen by using the DEC-20 VDIRECTORY command, for instance
  193. @Begin(Example)
  194. @@vdir foo.*
  195.  
  196.    PS:<MY-DIRECTORY>
  197.  Name     Protection    Pages Bytes(Size) Creation 
  198.  FOO.COM.1;P774242          1 384(8)     27-Dec-83 
  199.     MAC.1;P774242           1 152(7)     27-Dec-83 
  200.    .REL.1;P774242           1 39(36)     27-Dec-83
  201.    .EXE.1;P774242           2 1024(36)   27-Dec-83
  202.  
  203.  Total of 5 pages in 4 files
  204. @End(Example)
  205. In this example, @q<FOO.MAC> occupies 1 page, and is composed of 152 7-bit
  206. bytes.  This file is textual (program source for the MACRO assembler), 152
  207. characters long.  Programs which read text files (such as text editors, program
  208. compilers, the TYPE command, etc) determine the end of a file from the
  209. byte count specified in the directory.  Kermit-20 determines the end of file in
  210. the same way, so although @q<FOO.MAC> occupies an entire 2560-@|byte page of
  211. storage, only the first 152 characters are transmitted.  Binary files, such
  212. as @q<FOO.EXE> (an executable DEC-20 program), tend to occupy full pages.  In
  213. this case too, Kermit-20 uses the byte count to determine the end of file.
  214.  
  215. Why do you need to know all this?  In most cases, you don't.  It depends on
  216. whether you are using the DEC-20 as your "home base".
  217.  
  218. @heading<Using a Microcomputer to Archive DEC-20 Files>
  219.  
  220. Most computers (other than the DEC-10 and DEC-20) store characters in 8-bit
  221. bytes.  Let's call any such system an 8-bit-@|byte system.  Microcomputers that
  222. run CP/M or MS-DOS or PC-DOS, and any computers than run Unix, store these
  223. 8-bit bytes in a linear sequence.  Certain other 8-bit-@|byte systems (PDP-11
  224. or VAX systems with FILES-11, IBM mainframes) have more complex file formats.
  225. This discussion applies to all linear 8-bit-@|byte systems, including most
  226. popular microcomputers.
  227.  
  228. Kermit can send any "native" DEC-20 sequential file, text or binary, to an
  229. 8-bit-@|byte system and bring it back to the DEC-20 restored to its original
  230. form.  If you are using a microcomputer to archive your DEC-20 files, you need
  231. never concern yourself with details of byte size or file format.  The same
  232. holds true between two DEC-20s, or a DEC-10 and a DEC-20.
  233.  
  234. @index<End Of File>@index<CP/M> There is, however, one special complication of
  235. which you should be aware.  Certain microcomputer operating systems, notably
  236. CP/M, do not have an entirely satisfactory way of indicating the end of file.
  237. The file length is recorded in blocks rather than bytes.  For text files, the
  238. end of file is marked within a block by inserting a Control-Z after the last
  239. data character.  Binary files, however, might easily contain Control-Z
  240. characters as data.  Therefore, in order not to lose data, these systems must
  241. transmit binary files in complete blocks.  If the binary file is of foreign
  242. origin (for instance, from a DEC-20), and it did not happen to fill up the last
  243. block when it was transferred to the micro, then when that file is sent back to
  244. the system of origin in "binary mode," junk will appear at the end (if it is
  245. sent back in "text mode," it could be truncated at the first data byte that
  246. happened to correspond to Control-Z).  For DEC-20 programs in @q<.EXE> format,
  247. this generally has no effect on the runnability or behavior of the program.
  248. But for other binary files, particularly internal format numerical data or
  249. relocatable program object (@q<.REL>) files, the junk could have bad effects.
  250. For instance, extraneous data at the end of a @q<.REL> file will generally
  251. cause LINK to fail to load the file.
  252.  
  253. Most microcomputer Kermit programs have commands to control end-@|of-@|file
  254. detection -- commands like SET FILE TEXT, SET FILE BINARY, SET EOF CTRLZ.
  255.  
  256. @heading<Using the DEC-20 to Archive Microcomputer Files>
  257.  
  258. You can use Kermit to send textual files from a microcomputer or any 8-bit
  259. system to the DEC-20 with no special provisions, since Kermit-20 stores
  260. incoming characters in 7-bit bytes as text unless you explicitly instruct it
  261. otherwise.  But Kermit-20 has no automatic way of distinguishing an incoming
  262. binary file from an incoming text file.@foot<Unless the incoming file has an
  263. "ITS Binary Header"; see below.> Binary files from 8-bit-@|byte systems
  264. generally contain significant data in the 8th bit, which would be lost if the
  265. incoming characters were stored in 7-bit bytes, rendering the file useless when
  266. sent back to the original system.  Thus if you want to use Kermit to store
  267. foreign 8-bit binary data on the DEC-20, you must tell it to store such files
  268. with a bytesize of 8 rather than 7.  This can be the source of much confusion
  269. and inconvenience.  In particular, you cannot use a "wildcard send" command to
  270. send a mixture of text and binary files from an 8-bit-@|byte system to the
  271. DEC-20; rather, you must send all text files with Kermit-20's file bytesize set
  272. to 7, and all 8-bit binary files with the bytesize set to 8.
  273.  
  274. Once you get the foreign binary file into the DEC-20, stored with the correct
  275. bytesize (as @q<FOO.COM> is stored in the example above), you need take no
  276. special measures to send it back to its system of origin.  This is because
  277. Kermit-20 honors the bytesize and byte count from the directory.  For instance,
  278. if you told Kermit-20 to @q<SEND FOO.*>, every file in the example above would
  279. be transmitted in the correct manner, automatically.
  280.  
  281. The previous discussion assumes you want to store text files in usable form
  282. on the DEC-20.  However, if you are using the DEC-20 purely as a repository for
  283. your microcomputer files, and you have no desire to display or share the
  284. contents of those files on the DEC-20, you can SET FILE BYTESIZE 8 for all
  285. incoming files, both text and binary.  When the files are sent back to a
  286. microcomputer, they will be stored correctly.
  287.  
  288. @heading<Files Kermit-20 Cannot Handle>
  289.  
  290. The Kermit protocol can only accommodate transfer of @i<sequential> files,
  291. files which are a linear sequence of bytes (or words).
  292.  
  293. Some files on the DEC-20 are not sequential, and cannot be successfully sent or
  294. received by Kermit-20.  These include directory files, files with holes
  295. (missing pages), ISAM files, and RMS files.  These files require external
  296. information (kept in the DEC-20's file descriptor block and/or index table) in
  297. order to be reconstructed; when sending files, Kermit-20 presently transmits
  298. only the file name and the contents of the file.  External control information
  299. and file attributes are not transmitted.
  300.  
  301. @Section<Program Operation>
  302.  
  303. Kermit-20's prompt is "@q(Kermit-20>)".
  304. Kermit-20 will accept a single command on the Exec command line, like this:
  305. @begin[example]
  306. @@
  307. @@@ux[Kermit send foo.bar]
  308.  
  309.   @i(the file is sent)
  310.  
  311. @@
  312. @End(Example)
  313. or you can run the program interactively to issue several commands, like this:
  314. @Begin(Example)
  315. @@
  316. @@@ux[Kermit]
  317.  
  318. TOPS-20 Kermit version @value(-20version)
  319.  
  320. Kermit-20>@ux[send foo.*]
  321.  
  322.   @i(files are sent)
  323.  
  324. Kermit-20>@ux[statistics]
  325.  
  326.   @i(performance statistics are printed)
  327.  
  328. Kermit-20>@ux[receive]
  329.  
  330.   @i(files are received)
  331.  
  332. Kermit-20>@ux[exit]
  333. @@
  334. @end[example]
  335.  
  336. @index<Help>
  337. During interactive operation, you may use the TOPS-20 help ("?") and
  338. @index<Recognition>recognition (ESC) features freely while typing commands.  A
  339. question mark typed at any point in a command displays the options available at
  340. that point; typing an ESC character causes the current keyword or filename to
  341. be completed (or default value to be supplied), and a "guide word" in
  342. parentheses to be typed, prompting you for the next field.  If you have not
  343. typed sufficient characters to uniquely specify the keyword or filename (or if
  344. there is no default value) then a beep will be sounded and you may continue
  345. typing.
  346.  
  347. Command keywords may be abbreviated to their shortest prefix that sets them
  348. apart from any other keyword valid in that field.
  349.  
  350. If you have a file called @q<KERMIT.INI> in your login directory, Kermit-20
  351. will execute an automatic TAKE command on it upon initial startup.
  352. @q<KERMIT.INI> may contain any Kermit-20 commands, for instance SET commands,
  353. or DEFINEs for SET macros to configure Kermit-20 to various systems or
  354. communications media.
  355.  
  356. Kermit-20 provides most of the commands possible for an "ideal" Kermit program,
  357. as described in the main part of the @i(Kermit User Guide).  The following
  358. sections will concentrate on system-@|dependent aspects of Kermit-20.
  359.  
  360. @Section<Remote and Local Operation>
  361.  
  362. Kermit-20 normally runs in remote mode, with the user sitting at a PC.
  363. But Kermit-20 can also run in local mode.  Local operation of Kermit-20 is
  364. useful if the DEC-20 has an autodialer, or a hardwired connection to another
  365. computer.  When in local mode, file transfer takes place over an
  366. assigned TTY line, and Kermit-20 is free to update your screen with status
  367. information, and to listen to your keyboard for interrupt characters.
  368. @Begin(Figure)
  369. @bar()
  370. @blankspace(1)
  371. @Begin(Example)
  372. @i<Local Operation of Kermit-20:>
  373.  
  374.  DECSYSTEM-20
  375. +---------------------------------------+
  376. |                                       |
  377. |   +--------------------+              |
  378. |   | Your Job           |              |
  379. |   |                    |              |
  380. |   |   +------------+   | <--Commands  | Your Job's      
  381. |   |   | Kermit-20  +---+--------------+----------------- (-: You
  382. |   |   |            |   | Display--->  | Controlling TTY
  383. |   |   |            |   |              |
  384. |   |   |            |   |              |
  385. |   |   |            |   | <--Packets   | Kermit's
  386. |   |   |            +---+--------------+-----------------> Remote
  387. |   |   +------------+   | Packets-->   | Assigned TTY      System
  388. |   |                    |              |
  389. |   +--------------------+              |
  390. |                                       |
  391. +---------------------------------------+
  392. @End(Example)
  393. @caption(DEC-20 Kermit Local Operation)
  394. @tag(-20localfig)
  395. @bar()
  396. @End(Figure)
  397.  
  398. Kermit-20 enters local mode when you issue a SET LINE @i<n> command, where
  399. @i<n> is the octal TTY number of any line other than your own controlling
  400. terminal. 
  401.  
  402. @section<Conditioning Your Job for Kermit>
  403.  
  404. @index<Interference>
  405. @index<Message Interference>
  406. Kermit-20 does as much as it can to condition your line for file transfer.  It
  407. saves all your terminal and link settings, and restores them after use.
  408. However, there are some sources of interference over which Kermit-20 can have
  409. no control.  In particular, messages issued by superior or parellel forks could
  410. become mingled with Kermit packets and slow things down or stop them entirely.
  411. For this reason, before using Kermit-20 for any extended period, you should:
  412. @begin<itemize,spread 0.5>
  413. Type the Exec commands SET NO MAIL-WATCH and SET NO ALERTS
  414.  
  415. Make sure you don't have any print or batch jobs pending that were submitted
  416. with the /NOTIFY option.
  417.  
  418. Make sure you don't have any superior or parallel forks that have enabled
  419. terminal interrupts on Control-A; these could prevent Kermit packets (which
  420. start with Control-A) from getting through.
  421. @end<itemize>
  422. After running Kermit, you can restore your mail-watch and alerts by hand.
  423. Alternatively, you could have an Exec command file for invoking Kermit like
  424. this:
  425. @begin<example>
  426. set no alerts
  427. set no mail-watch
  428. kermit
  429. set mail-watch
  430. set alert  1:00PM Go to lunch
  431. set alert  6:00PM Go to dinner
  432. set alert 11:30PM Go to sleep
  433. @end<example>
  434.  
  435. @Section<Kermit-20 Commands>
  436.  
  437. This section describes the Kermit-20 commands -- in detail where they differ
  438. from the "ideal" Kermit, briefly where they coincide.  Kermit-20 has the
  439. following commands:
  440. @Begin(Format,spread 0)
  441. @tabclear()@tabset(1.25inches)
  442. @>BYE@\  to remote server.
  443. @>CLEAR@\  a stuck connection
  444. @>CLOSE@\  log file and stop logging remote session.
  445. @>CONNECT@\  as terminal to remote system.
  446. @>CWD@\  change local working directory.
  447. @>DEFINE@\  macros of Kermit-20 commands.
  448. @>DELETE@\  local files.
  449. @>DIRECTORY@\  listing of local files.
  450. @>ECHO@\  a line of text.
  451. @>EXIT@\  from Kermit-20.
  452. @>FINISH@\  Shut down remote server.
  453. @>GET@\  remote files from server.
  454. @>HELP@\  about Kermit-20.
  455. @>INPUT@\  characters from communication line.
  456. @>LOCAL@\  prefix for local file management commands.
  457. @>LOG@\  remote terminal session.
  458. @>OUTPUT@\  characters to communication line.
  459. @>PAUSE@\  between commands.
  460. @>PUSH@\  to TOPS-20 command level.
  461. @>QUIT@\  from Kermit-20
  462. @>RECEIVE@\  files from remote Kermit.
  463. @>REMOTE@\  prefix for remote file management commands.
  464. @>RUN@\  a DEC-20 program.
  465. @>SEND@\  files to remote Kermit.
  466. @>SERVER@\  mode of remote operation.
  467. @>SET@\  various parameters.
  468. @>SHOW@\  various parameters.
  469. @>SPACE@\  inquiry.
  470. @>STATISTICS@\  about most recent file transfer.
  471. @>TAKE@\  commands from a file.
  472. @>TRANSMIT@\  a file "raw".
  473. @>TYPE@\  a local file.
  474. @End(format)
  475.  
  476. @subsection<Commands for File Transfer>
  477.  
  478. Kermit-20 provides the standard SEND, RECEIVE, and GET commands for
  479. transferring files using the Kermit protocol.
  480.  
  481. @Heading<The SEND Command>
  482. @Index[Initial Filespec]@Index[SEND]
  483. Syntax: 
  484.  
  485. Sending a single file:
  486.  @display(@q<SEND @i{nonwild-filespec1} (AS) [@i{filespec2}]>)
  487.  
  488. Sending multiple files:
  489.  @display(@q<SEND @i{wild-filespec1} (INITIAL) [@i{filespec2}]>)
  490.  
  491. The SEND command causes a file or file group to be sent from the DEC-20 to the
  492. other system.  There are two forms of the command, depending on whether
  493. @i{filespec1} contains wildcard characters ("@q[*]" or "@q[%]").  Kermit-20
  494. automatically recognizes the two cases and issues the appropriate guide word,
  495. (AS) or (INITIAL), depending on the form of @i{filespec1}.
  496.  
  497. @subheading<@ @ Sending a File Group>
  498.  
  499. If @i{filespec1} contains wildcard characters then all matching files will be
  500. sent, in alphabetical order (according to the ASCII collating sequence) by
  501. name.  If a file can't be opened for read access, it will be skipped.
  502. @Index<Initial Filespec>The initial file in a wildcard group can be specified
  503. with the optional @i{filespec2}.  This allows a previously interrupted wildcard
  504. transfer from where it left off, or it can be used to skip some files that
  505. would be transmitted first.
  506.  
  507. @subheading<@ @ Sending a Single File>
  508.  
  509. If @i{filespec1} does not contain any wildcard characters, then the single file
  510. specified by @i{filespec1} will be sent.  Optionally, @i{filespec2} may be
  511. used to specify the name under which the file will arrive at the target
  512. system; @i{filespec2} is not parsed or validated in any way by Kermit-20,
  513. but lower case letters are raised to upper case, and leading
  514. "whitespace" (blanks and tabs) are discarded.  If @i{filespec2} is not
  515. specified, Kermit-20 will send the file with its own name.@foot[Control-V's,
  516. which are used to quote otherwise illegal characters in DEC-20 file
  517. specifications, are stripped.]
  518.  
  519. @Subheading<@ @ SEND Command General Operation:>
  520.  
  521. @Index<Normal Form for File Names>
  522. Files will be sent with their DEC-20 filename and filetype (for instance
  523. @q<FOO.BAR>, no device or directory field, no generation number or attributes).
  524. If you expect to be sending files whose names contain characters that would be
  525. illegal in filenames on the target system, and you know that the Kermit on the
  526. target system does not have the ability to convert incoming filenames, you can
  527. issue the SET FILE NAMING NORMAL-FORM command to have Kermit-20 replace suspect
  528. characters by @q<X>'s.
  529.  
  530. Each file will be sent according to its bytesize and byte count from the
  531. directory unless you specify otherwise using SET FILE BYTESIZE, or unless the
  532. file has an "ITS Binary" header.  If the bytesize is 8, then four 8-bit bytes
  533. will be sent from each DEC-20 36-bit word, and the low order four bits will be
  534. skipped.  If other than 8, then five 7-bit bytes will be sent from each word,
  535. with the 8th bit of the 5th character set to the value of the remaining bit
  536. ("bit 35") from the word.@foot<This is the same method used by the DEC-20 to
  537. encode 36-bit data on "ANSI-ASCII" tapes.  It allows not only DEC-20 binary
  538. files, but also the line-@|sequence-@|numbered files produced by EDIT, SOS, or
  539. OTTO, which use bit 35 to distinguish line numbers from text, to be sent and
  540. retrieved correctly.>
  541.  
  542. @Index<Parity>@Index<Eighth-Bit Prefix>@Index<Binary Files>
  543. @Index<Line Sequence Numbers>
  544. If communication line parity is being used (see SET PARITY), Kermit-20 will
  545. request that the other Kermit accept a special kind of prefix notation for
  546. binary files.  This is an advanced feature, and not all Kermits have it; if the
  547. other Kermit does not agree to use this feature, binary files cannot be sent
  548. correctly.  This includes executable programs (like DEC-20 @q<.EXE> files, CP/M
  549. @q<.COM> files), relocatable object modules (@q<.REL> files), as well as text
  550. files with line sequence numbers.
  551.  
  552. @Index<Repeated Character Compression>
  553. Kermit-20 will also ask the other Kermit whether it can handle a special prefix
  554. encoding for repeated characters.  If it can, then files with long strings of
  555. repeated characters will be transmitted very efficiently.  Columnar data,
  556. highly indented text, and binary files are the major beneficiaries of this
  557. technique.
  558.  
  559. If you're running Kermit-20 locally, for instance dialing out from the DEC-20
  560. to another system using an autodialer, you should have already run Kermit on
  561. the remote system and issued either a RECEIVE or a SERVER command.
  562. Once you give Kermit-20 the SEND command, the name of each file will be
  563. displayed on your screen as the transfer begins; a "@q<.>" will be displayed
  564. for every 5 data packets sucessfully sent, and a "@q<%>" for every
  565. retransmission or timeout that occurs (you may also elect other typeout options
  566. with the SET DEBUG command).  If the file is successfully transferred, you will
  567. see "@q<[OK]>", otherwise there will be an error message.  When the specified
  568. operation is complete, the program will sound a beep.
  569. If you see many "@q<%>" characters, you are probably suffering from a noisy
  570. connection.  You may be able to cut down on the retransmissions by using SET
  571. SEND PACKET-LENGTH to decrease the packet length; this will reduce the
  572. probability that a given packet will be corrupted by noise, and reduce the time
  573. required to retransmit a corrupted packet.
  574.  
  575. During local operation, you can type Control-A@Index<Control-A> at any point
  576. during the transfer to get a brief status report.
  577. @index<Control-X>@index<Control-Z>@Index<Cancelling a File Transfer> You may
  578. also type Control-X or Control-Z to interrupt the current file or file group.
  579.  
  580. @Heading<The RECEIVE Command>
  581. @Index[RECEIVE]
  582. Syntax:  @q<RECEIVE [@i{filespec}]>
  583.  
  584. The RECEIVE command tells Kermit-20 to receive a file or file group from the
  585. other system.  If only one file is being received, you may include the optional
  586. @i{filespec} as the name to store the incoming file under; otherwise, the name
  587. is taken from the incoming file header.  Even if the name in the header is not
  588. a legal TOPS-20 file name, Kermit-20 will store it under that name, in which
  589. case you can refer to it later only by quoting each illegal character (spaces,
  590. control characters, etc) with Control-V@Index<Control-V>.
  591. If for some reason an incoming filename simply cannot be converted to legal
  592. form, the file will be saved as @q<-UNTRANSLATABLE-FILENAME-.KERMIT> (new
  593. generation).  You may also use SET FILE NAMING NORMAL-FORM to have Kermit-20
  594. choose more conventional names for incoming files.
  595.  
  596. @index<DELETE>@index<UNDELETE>@index<Generation>
  597. If an incoming file has the same name as an
  598. existing file, Kermit-20 just creates a new generation of the same name and
  599. type, for instance @q<FOO.BAR.3, FOO.BAR.4>.  The oldest generation will be
  600. automatically deleted, but you can still UNDELETE it.
  601.  
  602. Incoming files will all be stored with the prevailing bytesize, 7 by default,
  603. which is appropriate for text files.  @Index<Binary Files> If you are asking
  604. Kermit-20 to receive binary files from a microcomputer or other 8-bit system,
  605. you must first type SET FILE BYTESIZE 8.  Otherwise, the 8th bit of each byte
  606. will be lost and the file will be useless when sent back to the system of
  607. origin.
  608.  
  609. @Index<Parity>@Index<Eighth-Bit Prefix>@Index<Repeated Character Compression>
  610. If you have SET PARITY, then 8th-bit prefixing will be requested.  If the other
  611. side cannot do this, binary files cannot be transferred correctly.  In all
  612. cases, Kermit-20 will request the other Kermit to compress repeated characters;
  613. if the other side can do this (not all Kermits know how) there may be a
  614. significant improvement in transmission speed.
  615.  
  616. If an incoming file does not arrive in its entirety, Kermit-20 will normally
  617. discard it; it will not appear in your directory.  You may change this behavior
  618. @Index<Incomplete File Disposition>
  619. by using the command SET INCOMPLETE KEEP, which will cause as much of the file
  620. as arrived to be saved in your directory. 
  621.  
  622. If you are running Kermit-20 locally, you should already have issued a
  623. SEND command @foot(@i<not> SERVER -- use the GET command to receive files from
  624. a Kermit server.) to the remote Kermit, and then escaped back to DEC-20 Kermit.
  625. As files arrive, their names will be displayed on your screen, along with
  626. "@q<.>" and "@q<%>" characters to indicate the packet traffic; you can type
  627. Control-A during the transfer for a brief status report.
  628.  
  629. @Index<Control-X>@Index<Control-Z>@Index<Cancelling a File Transfer>
  630. If a file arrives that you don't really want, you can attempt to cancel it
  631. by typing Control-X; this sends a cancellation request to the
  632. remote Kermit.  If the remote Kermit understands this request (not all
  633. implementations of Kermit support this feature), it will comply;
  634. otherwise it will continue to send.  If a file group is being sent, you can
  635. request the entire group be cancelled by typing Control-Z.
  636.  
  637. @Heading<The GET Command>
  638.  
  639. Syntax: @q<GET [@i{remote-filespec}]>
  640.  
  641. The GET command requests a remote Kermit server to send the file or file group
  642. specified by @i<remote-filespec>.  This command can be used only when
  643. there is a Kermit server on the other end of the line.
  644. This means that you must have CONNECTed to the other system, logged in,
  645. run Kermit there, issued the SERVER command, and escaped back to the DEC-20,
  646. or else you Kermit-20 is in remote mode, TAKEing commands from a file, and
  647. interacting with a local Kermit server.
  648.  
  649. The remote filespec is any string that can be a legal file specification for
  650. the remote system; it is not parsed or validated locally.  You should not
  651. put a trailing comment on the GET command, since this will be sent as part
  652. of the remote filespec.
  653.  
  654. If you need to include otherwise illegal characters such as "@q<!>" or "@q<;>"
  655. (the normal command comment delimeters), "@q<?>" (the command help character),
  656. "@q<@@>" (the indirect command file indicator), or certain control characters,
  657. then you should precede each such character by a Control-V.  Kermit-20 will
  658. discard these Control-V quoting prefixes before sending the file specification
  659. to the remote host.
  660.  
  661. If you want to store the incoming file name with a different name than the
  662. remote host sends it with, just type GET alone on a line; Kermit-20 will
  663. prompt you separately for the source (remote) and destination (local)
  664. file specification.  If more than one file arrives, only the first one will
  665. be stored under the name given; the rest will be stored under the names
  666. they are sent with.
  667. Example:
  668. @begin(example)
  669. Kermit-20>@ux[get]
  670.  Remote Source File: @ux[profile exec a1]
  671.  Local Destination File: @ux[profile.exec]
  672. @end(example)
  673.  
  674. As files arrive, their names will be displayed on your screen, along with
  675. "@q<.>" and "@q<%>" characters to indicate the packet traffic.  As in the
  676. RECEIVE command, you may type Control-A to get a brief status report, ^X to
  677. request that the current incoming file be cancelled, ^Z to request that the
  678. entire incoming batch be cancelled.
  679.  
  680. If the remote Kermit is not capable of server functions, then you will probably
  681. get an error message back from it like "Illegal packet type".  In this case,
  682. you must connect to the other Kermit, give a SEND command, escape back, and
  683. give a RECEIVE command.
  684.  
  685. @Heading<The STATISTICS Command>
  686. Give statistics about the most recent file transfer.
  687. For instance, here's what Kermit-20 displayed after transmitting a short binary
  688. file, using repeated-@|character compression:
  689. @Begin(Example) 
  690.  
  691.  Maximum number of characters in packet:  80 received; 80 sent
  692.  Number of characters transmitted in 2 seconds
  693.         Sent:      34           Overhead:       34
  694.         Received:  107          Overhead:       -408
  695.   Total received:  141          Overhead:       -374
  696.  Total characters transmitted per second:       70
  697.  Effective data rate:   2570 baud
  698.  Efficiency:            214.1667 per cent
  699.  Interpacket pause in effect: 0 sec
  700.  
  701.  Timeouts: 0
  702.  NAKs:     0
  703. @End(Example)
  704.  
  705. Note that the data compression allowed the effective baud rate to exceed the
  706. actual speed of the communication line, which in this case happened to be 1200
  707. baud.  The efficiency is displayed only if the actual baud rate is known.
  708.  
  709. @subsection<Server Operation>
  710.  
  711. @Heading<The SERVER Command>
  712. @Index<Server>
  713.  
  714. The SERVER command puts a remote Kermit-20 in "server mode", so that it
  715. receives all further commands in packets from the local Kermit.  The Kermit-20
  716. server is capable (as of this writing) of executing the following remote server
  717. commands:  SEND, GET, FINISH, BYE, REMOTE DIRECTORY, REMOTE CWD,
  718. REMOTE SPACE, REMOTE DELETE, REMOTE TYPE, REMOTE HELP.
  719.  
  720. @Index<Byte Size>
  721. Any nonstandard parameters should be selected with SET commands before putting
  722. Kermit-20 into server mode, in particular the file bytesize.  The DEC-20 Kermit
  723. server can send most files in the correct manner automatically, by recognizing
  724. the DEC-20 file bytesize.  However, if you need to ask the DEC-20 Kermit server
  725. to receive binary files from an 8-bit-@|byte system (that is, from almost any
  726. system that's not a DEC-10 or DEC-20) you must issue the SET FILE BYTESIZE 8
  727. command before putting it into server mode, and then you must only send 8-bit
  728. binary files.  You cannot send a mixture of text files and 8-bit binary files
  729. to a Kermit-20 server.
  730.  
  731. @Heading<Commands for Servers>
  732.  
  733. When running in local mode, Kermit-20 allows you to give a wide range of
  734. commands to a remote Kermit server, with no guarantee the that the remote
  735. server can process them, since they are all optional features of the protocol.
  736. Commands for servers include the standard @q<SEND>, @q<GET>, @q<BYE>,
  737. and @q<FINISH> commands, as well as the @q<REMOTE> command.
  738.  
  739. These commands are generally issued when Kermit-20 is in local mode, i.e. you
  740. have already connected to another system, run Kermit there and put it into
  741. server mode, and escaped back to Kermit-20.  However, Kermit-20 also allows
  742. you to operate in the opposite direction, i.e. Kermit-20 is the remote
  743. Kermit, and the local Kermit is in server mode.  This is handy when, for
  744. instance, you want to transfer a disparate collection of files that can't
  745. be readily specified by a wildcard group, all in a single, unattended
  746. operation.  In this case, you can create a TAKE command file for Kermit-20 that
  747. SENDs and/or GETs the desired files, and then shuts down local server when
  748. done, e.g.:
  749. @begin<example>
  750. set delay 0        ; No need to pause before sending
  751. ; Connect to own directory, leave a blank line for password.
  752. cwd me:
  753.  
  754. log transactions    ; Keep a log
  755. ; Change directories on the PC.
  756. remote cwd \kermit
  757.  
  758. send ker:mskerm.doc    ; Send the MS-DOS Kermit manual
  759. send ker:mskerm.bwr    ; Send the MS-DOS Kermit "beware file"
  760. ; Now change to the MS-DOS binaries area
  761. remote cwd \bin
  762.  
  763. send kb:msvibm.exe    ; Send the executable DOS Kermit program
  764. ; Put DOS back in default directory
  765. remote cwd \chris
  766.  
  767. ; Connect back to default directory on the DEC-20
  768. cwd me:
  769.  
  770. close transactions    ; Close transaction log
  771. send transaction.log    ; Send it
  772. finish            ; Shut down DOS Kermit server
  773. @end<example>
  774. Commands to servers (GET, BYE, FINISH, REMOTE) can be issued from a remote
  775. Kermit-20 only by means of a TAKE file.  When Kermit-20 is local (i.e. after
  776. SET LINE), you can issue these commands interactively as well.
  777.  
  778. @subheading<The REMOTE Command>
  779.  
  780. Send the specified command to the remote server.  If the server does not
  781. understand the command (all of these commands are optional features of the
  782. Kermit protocol), it will reply with a message like "Unknown Kermit server
  783. command".  If does understand, it will send the results back, and they will be
  784. displayed on the screen.  The REMOTE commands are:
  785. @begin<description>
  786. CWD [@i<directory>]@\Change Working Directory.  If no directory name is
  787. provided, the server will change to the default or home directory.  Otherwise,
  788. you will be prompted for a password, and the server will attempt to change to
  789. the specified directory.  The password is entered on a separate line, and does
  790. not echo as you type it.  If access is not granted, the server will provide a
  791. message to that effect.  Do not put trailing comments after a REMOTE CWD
  792. command, or after the password.
  793.  
  794. DELETE @i<filespec>@\Delete the specified file or files.  The names of the
  795. files that are deleted will appear on your screen.
  796.  
  797. DIRECTORY [@i<filespec>]@\The names of the files that match the given
  798. file specification will be displayed on your screen, perhaps along with size
  799. and date information for each file.  If no file specification
  800. is given, all files from the current directory will be listed.
  801.  
  802. HELP@\Provide a list of the functions that are available from the server.
  803.  
  804. HOST [@i<command>]@\Pass the given command to the server's host command
  805. processor, and display the resulting output on your screen.
  806.  
  807. SPACE@\Provide information about disk usage in the current directory, such as
  808. the quota, the current storage, the amount of remaining free space.
  809.  
  810. TYPE @i<filespec>@\Display the contents of the specified file on your screen.
  811. @end<description>
  812.  
  813. @Subsection<Commands for Local File Management>
  814.  
  815. Syntax: @q<LOCAL [@i{command}]>
  816.  
  817. Execute the specified command on the local system -- on the DEC-20 where
  818. Kermit-20 is running.  These commands provide some local file management
  819. capability without having to leave the Kermit-20 program.
  820. @begin<description>
  821. CWD [@i<directory>]@\Change working directory, or, in DEC-20 terminology,
  822. CONNECT to the specified directory.  If a password is required, you will be
  823. prompted for one.  Do not include a trailing comment after the password.
  824.  
  825. DELETE @i<filespec>@\Delete the specified file or files, but do not expunge
  826. them (unless you have SET EXPUNGE ON).
  827.  
  828. DIRECTORY [@i<filespec>]@\Provide a directory listing of the specified files.
  829.  
  830. RUN [@i<filespec>]@\Attempts to run the specified file, which must be in
  831. "@q<.EXE>" format (@q<.EXE> is the default filetype), in an inferior fork.
  832. Control returns to Kermit-20 when the program terminates.  Once you have used
  833. this command, you can restart the same program by issuing a RUN command with no
  834. arguments.  If you RUN @q<SYSTEM:EXEC>, then you will be able to issue TOPS-20
  835. commands without leaving Kermit; you can get back to Kermit from the EXEC by
  836. typing the EXEC POP command.
  837.  
  838. SPACE@\Show how much space is used and remaining in the current directory.
  839.  
  840. TYPE@\Display the contents of the specified file or files at your terminal.
  841. This works like the DEC-20 TYPE command, except that if a file has a bytesize
  842. of 8, Kermit-20 will do 8-bit input from it rather than 7-bit.  Also, the
  843. DEC-20 Control-O command discards output only from the file currently being
  844. displayed; if multiple files are being typed, then output will resume with the
  845. next file.
  846.  
  847. @end<description>
  848. The LOCAL commands may also be used without the "LOCAL" prefix.
  849.  
  850. @Subsection<The CONNECT Command>
  851.  
  852. Syntax: @q<CONNECT [@i{number}]>
  853.  
  854. Establish a terminal connection to the system connected to the octal TTY number
  855. specified here or in the most recent SET LINE command, using full duplex
  856. echoing and no parity unless otherwise specified in previous SET commands.  Get
  857. back to Kermit-20 by typing the escape character followed by the letter C.  The
  858. escape character is Control-Backslash (@q<^\>) by default.  When you type the
  859. escape character, several single-@|character commands are possible:
  860.  
  861. @Begin(Description,leftmargin +6,indent -4, spread 0)
  862. @q<C>@\Close the connection and return to Kermit-20.
  863.  
  864. @q<S>@\Show status of the connection; equivalent to SHOW LINE.
  865.  
  866. @q<P>@\Push to a new Exec.  POP from the Exec to get back to the connection.
  867.  
  868. @q<Q>@\If a session log is active, temporarily Quit logging.
  869.  
  870. @q<R>@\Resume logging to the session log.
  871.  
  872. @q<B>@\Send a simulated BREAK signal.
  873.  
  874. @q<?>@\List all the possible single-character arguments.
  875.  
  876. @q<^\> (or whatever you have set the escape character to be):@\Typing the
  877. escape character twice sends one copy of it to the connected host.
  878. @End(Description)
  879. You can use the SET ESCAPE command to define a different escape character, and
  880. SET PARITY, SET DUPLEX, SET HANDSHAKE, SET FLOW, and SET SPEED to change those
  881. communication-@|line-@|oriented parameters.  In order for the simulated BREAK
  882. signal to work, TOPS-20 must know the speed of the terminal.  If it does not,
  883. you may use the SET SPEED command.  Type the SHOW LINE command for information
  884. about your current communication settings.
  885.  
  886. Kermit-20 does not have any special autodialer interface.  It assumes that the
  887. connection has already been made and the line assigned.  
  888.  
  889. @Subsection<The SET, SHOW, and DEFINE Commands>
  890.  
  891. SET is used for establishing or changing parameters, DEFINE lets you group
  892. several SET commands together into a single "macro" command, and SHOW lets
  893. you examine current settings or macro definitions.
  894.  
  895. @Heading<The SET Command>
  896.  
  897. Syntax: @q<SET @i{parameter} [@i{option} [@i{value}]]>
  898.  
  899. Establish or modify various parameters for file transfer or terminal
  900. connection.  You can examine their values with the SHOW command.  The following
  901. parameters may be SET:
  902. @Begin(Format,spread 0)
  903. @tabclear()@tabset(2.0inches)
  904. @>BREAK@\  Adjust the BREAK simulation parameter
  905. @>BLOCK-CHECK@\  Packet transmission error detection method
  906. @>DEBUGGING@\  Record or display state transitions or packets
  907. @>DELAY@\  How long to wait before starting to send
  908. @>DUPLEX@\  For terminal connection, FULL or HALF
  909. @>ESCAPE@\  Character for terminal connection
  910. @>FILE@\  For setting file parameters like byte size
  911. @>FLOW-CONTROL@\  For enabling or disabling XON/XOFF flow control
  912. @>HANDSHAKE@\  For turning around half duplex communication line
  913. @>IBM@\  For communicating with an IBM mainframe
  914. @>INCOMPLETE@\  What to do with an incomplete file
  915. @>INPUT@\  For specifying behavior of the INPUT command
  916. @>ITS-BINARY@\  For recognizing a special 8-bit binary file format
  917. @>LINE@\  TTY line to use for file transfer or CONNECT
  918. @>PARITY@\  Character parity to use
  919. @>PROMPT@\  Change the program's command prompt
  920. @>RECEIVE@\  Various parameters for receiving files
  921. @>RETRY@\  How many times to retry a packet before giving up
  922. @>SEND@\  Various parameters for sending files
  923. @>SPEED@\  Baud rate of communication line
  924. @>TVT-BINARY@\  For negotiating binary mode on ARPANET
  925. @end(Format)
  926.  
  927. The DEFINE command may be used to compose "macros" by combining SET commands.
  928. Those SET commands which differ from the "ideal" Kermit are now described in
  929. detail.
  930.  
  931. @Subheading<SET BREAK>
  932. @Index<BREAK Simulation>
  933. Syntax: @q<SET BREAK @i(n)>
  934. Specify the number of nulls to be sent at 50 baud to simulate a BREAK
  935. signal when connected to a remote host via SET LINE and CONNECT.
  936.  
  937. @Subheading<SET DEBUG>
  938. @Index<Debugging>
  939. Syntax: @q<SET DEBUG @i{options}>
  940.  
  941. Record the packet traffic, either on your terminal or in a file.  Some
  942. reasons for doing this would be to debug a version of Kermit that you are
  943. working on, to record a transaction in which an error occurred for evidence
  944. when reporting bugs, or simply to vary the display you get when running
  945. Kermit-20 in local mode.  Options are:
  946. @Begin(Description)
  947. STATES@\Show Kermit state transitions and packet numbers (brief).
  948.  
  949. PACKETS@\Display each incoming and outgoing packet (lengthy).
  950.  
  951. OFF@\Don't display or record debugging information (this is the normal mode).
  952. If debugging was in effect, turn it off and close any log file.
  953. @End(Description)
  954. The debugging information is recorded in the file specified by the most recent
  955. LOG DEBUGGING command, @q<DEBUGGING.LOG> by default.
  956.  
  957. @Subheading<SET ESCAPE>
  958. @Index<Escape Character for CONNECT>
  959. @q<SET ESCAPE @i{octal-number}>
  960.  
  961. Specify the control character you want to use to "escape" from remote
  962. connections back to Kermit-20.  The default is 34 (Control-\).  The number is
  963. the octal value of the ASCII control character, 1 to 37 (or 177), for instance
  964. 2 is Control-B.  After you type the escape character, you must follow it by a
  965. one of the single-@|character "arguments" described under the CONNECT command,
  966. above.
  967.  
  968. @Subheading<SET EXPUNGE>
  969. @Index<Expunging Deleted Files>
  970. @q<SET EXPUNGE ON @i(or) OFF>
  971.  
  972. Tell whether you want a DELETE command (either the LOCAL DELETE command or a
  973. REMOTE DELETE command sent to a Kermit-20 server) to expunge files as it
  974. deletes them.  On the DEC-20, a deleted file continues to take up space, and
  975. may be "undeleted" at a later time in the same session.  To expunge a deleted
  976. file means to remove it completely and irrevocably, freeing its space for
  977. further use.  EXPUNGE is OFF by default; deleted files are not automatically
  978. expunged.  SET EXPUNGE applies only to files that are deleted explicitly by
  979. Kermit-20, and not to files that are implicitly deleted when new generations of
  980. existing files are created.
  981.  
  982. @Subheading<SET FILE>
  983. Syntax: @q<SET FILE @i{parameter keyword}>
  984.  
  985. Establish file-related parameters:
  986. @Begin(Description,leftmargin +8,indent -8)
  987. BYTESIZE @i{keyword or number}@\@Index<Byte Size>Byte size for DEC-20 file
  988. input/output.  The choices are SEVEN (7), EIGHT (8), and AUTO.
  989. @Begin(Description,leftmargin +8,indent -8)
  990. SEVEN@\(or 7) Always store or retrieve five 7-bit bytes per word.  When sending
  991. a file, ignore the file bytesize and do 7-bit input from the file.  There would
  992. be no reason to use this option except to explicitly force an 8-bit file to be
  993. treated as a 7-bit file.
  994.  
  995. EIGHT@\(or 8) Always store or retrieve four 8-bit bytes per word.  When sending
  996. a file, ignore the file bytesize and do 8-bit input from the file.  This
  997. command is necessary when receiving binary files from 8-bit-@|byte systems,
  998. such as most microcomputers.
  999.  
  1000. AUTO@\Equivalent to SEVEN for incoming files, and for outgoing files means to
  1001. use EIGHT if the DEC-20 file bytesize (as shown by the Exec VDIR command) is 8,
  1002. otherwise use SEVEN.  The default is AUTO.
  1003. @End(Description)
  1004. The DEC-20 can send any mixture of file types in the correct way automatically,
  1005. but you @i<must> set the file bytesize to 8 for any incoming 8-bit binary
  1006. files, and to AUTO (i.e. 7) for any incoming text files or DEC-20 binary files.
  1007.  
  1008. @Index<Normal Form for File Names>
  1009. NAMING UNTRANSLATED @i<or> NORMAL-FORM@\If NORMAL-FORM the names of incoming or
  1010. outgoing files will be converted to contain only uppercase letters, digits, and
  1011. at most one period; any other characters will be translated to "@q<X>".  If
  1012. UNTRANSLATED, filenames will be sent and used literally.  UNTRANSLATED is the
  1013. default.
  1014. @End(Description)
  1015.  
  1016. @subheading<SET IBM>
  1017. @index<IBM>
  1018. Syntax: @q<SET IBM ON @i(or) OFF>
  1019.  
  1020. SET IBM is really a predefined SET macro rather than a "hardwired" SET command;
  1021. it can be redefined or undefined (see DEFINE); as distributed from Columbia,
  1022. Kermit-20 defines IBM to be "parity mark, handshake XON, duplex half".
  1023.  
  1024. SET IBM should be used when running Kermit-20 in local mode, connected to an
  1025. IBM or similar mainframe.  If you have redefined the SET IBM macro, then your
  1026. parameters will be used instead.
  1027.  
  1028. @Subheading<SET ITS-BINARY>
  1029. @Index<ITS-Binary Format>
  1030. Syntax: @q<SET ITS-BINARY ON @i<or> OFF>
  1031.  
  1032. Specify whether ITS-Binary file headers are to be recognized or ignored.  By
  1033. default, they are recognized.  ITS binary format is a way (devised at MIT) of
  1034. storing foreign 8-bit binary data on a 36-bit machine to allow automatic
  1035. recognition of these files when sending them out again, so that you don't have
  1036. to depend on the file byte size, or to issue explicit SET FILE BYTESIZE
  1037. commands to Kermit.
  1038.  
  1039. An ITS format binary file contains the sixbit characters "DSK8" left-adjusted
  1040. in the first 36-bit word.  If ITS-BINARY is ON, then Kermit-20 will send any
  1041. file starting with this "header word" using 8-bit input from the file even if
  1042. the file bytesize is not 8, and will not send the header word itself.
  1043. Kermit-20 will also store any incoming file that begins with that header word
  1044. using 8-bit bytesize, again discarding the header word itself.  If ITS-BINARY
  1045. is OFF, then the header word, if any, will be sent or kept, and i/o will be
  1046. according to the setting of FILE BYTESIZE.
  1047.  
  1048. This facility is provided for compatibility with the file formats used on
  1049. certain public-@|access CP/M libraries. 
  1050.  
  1051. @Subheading<SET INPUT>
  1052. @index<INPUT>@index<SET INPUT>
  1053. Syntax: @q<SET INPUT @i(parameter value)>
  1054.  
  1055. The INPUT command is used in TAKE command files or DEC-20 Batch control
  1056. files as part of the login script facility, which is explained in greater
  1057. detail later.  SET INPUT controls the behavior of the INPUT command.
  1058. The parameters are as follows:
  1059.  
  1060. @begin<description,leftmargin +8, indent -8>
  1061. SET INPUT DEFAULT-TIMEOUT @i<n>@\@i<n> is the number of seconds for an INPUT
  1062. command to time out after not receiving the requested input, when no interval
  1063. is explicitly given in the INPUT command.  For instance, if the default timeout
  1064. interval is 10 seconds, then the command
  1065. @example<INPUT login:>
  1066. will look for the "@q<login:>" prompt for 10 seconds.  The default may be
  1067. overriden by including an explicit interval in the INPUT command:
  1068. @example<INPUT 15 login:>
  1069. The default timeout interval is 5 seconds.
  1070.  
  1071. @index<TAKE>@index<Batch>
  1072. SET INPUT TIMEOUT-ACTION PROCEED @i<or> QUIT@\If the INPUT command comes from a
  1073. Kermit-20 command file (see TAKE command) or a TOPS-20 Batch control file, then
  1074. use this command to specify whether processing of the command file should
  1075. proceed or quit after a timeout occurs.  For TAKE files, the current command
  1076. file is terminated and control returns to the invoking level (Kermit-20
  1077. prompt level, or a superior TAKE file).  The default action is PROCEED.
  1078.  
  1079. SET INPUT CASE IGNORE @i<or> OBSERVE@\Specify whether alphabetic case should be
  1080. ignored ("a" matches "A") or observed ("a" does not match "A") when scanning
  1081. the input for the specified search string.  By default, aphabetic case is
  1082. ignored.
  1083. @end<description>
  1084. SET INPUT commands are "global"; the settings are not "pushed" and "popped"
  1085. when entering or leaving TAKE command files.
  1086.  
  1087. @Subheading<SET LINE>
  1088. Syntax: @q<SET LINE [@i(octal-number)]>
  1089.  
  1090. Specify the octal TTY number to use for file transfer or CONNECT.
  1091. If you issue this command, you will be running Kermit-20 @i<locally>, and you
  1092. must log in to the remote system and run Kermit on that side in order to
  1093. transfer a file.  If you don't issue this command, Kermit-20 assumes it is
  1094. running @i<remotely>, and does file transfer over its job's controlling
  1095. terminal line.  You can also select the line directly in the CONNECT command;
  1096. the command @example(CONNECT 12) is equivalent to
  1097. @begin<example>
  1098. SET LINE 12
  1099. CONNECT
  1100. @end<example>
  1101.  
  1102. If you type SET LINE with no number argument, you will deassign any previous
  1103. assigned line and revert to remote mode.
  1104.  
  1105. The SHOW LINE command will display the currently selected communication line
  1106. and its charactistics, including parity, duplex, handshake, flow control, the
  1107. speed if known, whether carrier is present (if it is a modem-@|controlled
  1108. line), and whether Kermit-20 is in local or remote mode.
  1109.  
  1110. @subheading<SET RECEIVE>
  1111.  
  1112. In addition to the full complement of SET RECEIVE commands described in the
  1113. main part of the Kermit User Guide, you may also SET RECEIVE SERVER-TIMEOUT to
  1114. a value between 0 and 94.  This specifies the number of seconds between
  1115. timeouts during server command wait, 0 specifies that no timeouts should occur
  1116. during server command wait.  When a Kermit server times out, it sends a NAK
  1117. packet.  Some systems cannot clear piled-@|up NAKs from their input buffers; if
  1118. you're using such a system to communicate with a Kermit-20 server, and you
  1119. expect to be leaving the server idle for long periods of time, you should use
  1120. this command to turn off server command-@|wait timeouts.
  1121.  
  1122. @subheading<SET SPEED>
  1123.  
  1124. Syntax: @q<SET SPEED @i(n)>
  1125.  
  1126. @index<BREAK Simulation>@index<Speed>
  1127. Set the baud rate of the currently selected communication to @i(n), the decimal
  1128. baud rate, for instance 300, 1200, 4800.  When operating in local mode, it
  1129. may be necessary to issue this command in order to enable BREAK simulation.
  1130.  
  1131. @subheading<SET TVT-BINARY>
  1132.  
  1133. Syntax: @q<SET TVT-BINARY ON> @i<or> @q<OFF>
  1134.  
  1135. @index<ARPANET>@index<TAC Binary Mode>@index<TVT-Binary>
  1136. Only for users running Kermit-20 on an ARPANET DEC-20, signed on to an ARPANET
  1137. virtual terminal (TVT) from another host or through an ARPANET TAC.
  1138. SET TVT ON causes Kermit-20 to negotiate binary mode
  1139. (8-bit) communication with the ARPANET during file transfer.  Without this
  1140. command, file transfer through a TVT would not work in most cases.
  1141.  
  1142. TVT-BINARY is OFF by default.  If you normally use Kermit-20 through the
  1143. ARPAnet, you can put the command SET TVT-BINARY ON into your @q<KERMIT.INI>
  1144. file.
  1145.  
  1146. @i<CAUTION>: This facility requires certain features in the Release 5 TOPS-20
  1147. ARPANET monitor, which may not be present in releases distributed by DEC.  See
  1148. the Kermit-20 source code for details.
  1149.  
  1150. @heading<The DEFINE Command>
  1151.  
  1152. Syntax: @q<DEFINE @i<macroname> [@i<set-option> [, @i<set-option> [...]]]>
  1153.  
  1154. @Index<DEFINE Command>
  1155. The DEFINE command is available in Kermit-20 for building "macros" of SET
  1156. commands.  The macro name can be any keyword-@|style character string, and the
  1157. set options are anything you would type after SET in a SET command; several set
  1158. options may be strung together, separated by commas.  Example:
  1159. @example<define notimeout send timeout 0, receive timeout 0, receive server 0>
  1160. Macro definitions may not include macro names.  You can list all your macros
  1161. and their definitions with the SHOW MACROS command.  You can list a particular
  1162. macro definition with HELP SET @i<macroname>.
  1163.  
  1164. @Heading<The SHOW Command>
  1165. @Index<SHOW>
  1166. Syntax: @q<SHOW> [@i<option>]
  1167.  
  1168. The SHOW command displays various information:
  1169. @Begin(Description,spread 0.5)
  1170. DAYTIME@\Current date, time, phase of moon.
  1171.  
  1172. DEBUGGING@\Debugging mode in effect, if any.
  1173.  
  1174. FILE-INFO@\Byte size for DEC-20 file i/o, incomplete file disposition.
  1175.  
  1176. @index<INPUT>
  1177. INPUT@\INPUT command parameters.
  1178.  
  1179. @index<Speed>
  1180. LINE@\TTY line, parity, duplex, flow control, handshake, escape character,
  1181. speed (if known), and session loggin information.  Note that before release 6.0
  1182. of TOPS-20, the DEC-20 does not keep a record of the actual baud rate of a
  1183. modem-@|controlled or "remote" TTY line.
  1184.  
  1185. MACROS@\Definitions for SET macros.
  1186.  
  1187. PACKET-INFO@\For incoming and outbound packets.  Items under RECEIVE column
  1188. show parameters for packets Kermit-20 expects to receive, under SEND shows
  1189. parameters for outgoing packets.
  1190.  
  1191. TIMING-INFO@\Delays, retries, server NAK intervals.
  1192.  
  1193. VERSION@\Program version of Kermit-20.  This is also displayed when Kermit-20
  1194. is initially started.
  1195.  
  1196. ALL@\(default) All of the above.
  1197. @End(Description)
  1198.  
  1199. @subsection<Program Management Commands>
  1200.  
  1201. @Heading<The TAKE Command>
  1202. Syntax: @q<TAKE @i{filespec}>
  1203.  
  1204. Execute Kermit-20 commands from the specified file.  The file may contain
  1205. contain any valid Kermit-20 commands, including other TAKE commands; command
  1206. files may be nested up to a depth of 20.  Default file type for the command
  1207. file is @q<.CMD>.  Most commands may have trailing comments, beginning by
  1208. semicolon, but these should be avoided in REMOTE commands, GET commands,
  1209. and the passwords that are prompted for after CWD and REMOTE CWD commands.
  1210.  
  1211. @Heading<The ECHO Command>
  1212. Syntax: @q<ECHO> @i<line of text>
  1213.  
  1214. @index<ECHO>
  1215. The line of text is echoed at the terminal.  This is useful when issued from
  1216. within TAKE command files, to report progress or issue instructions.
  1217.  
  1218. @Heading<The HELP Command>
  1219.  
  1220. Syntax: @q<HELP [@i{topic} [@i{subtopic}]]> 
  1221.  
  1222. Typing HELP alone prints a brief summary of Kermit-20 and its commands.
  1223. You can also type
  1224. @Begin(Example)
  1225. HELP @i<command>
  1226. @End(Example)
  1227. for any Kermit-20 command, e.g. "help send" or "help set parity" to get more
  1228. detailed information about a specific command.  Type
  1229. @Begin(Example)
  1230. HELP ?
  1231. @End(Example)
  1232. to see a list of the available help commands. 
  1233.  
  1234. @Heading<The EXIT and QUIT Commands>
  1235. @Index<EXIT>@Index<CONTINUE>@Index<Control-C>
  1236. Syntax: @q<EXIT>
  1237.  
  1238. Exit from Kermit-20.  You can CONTINUE the program from the TOPS-20 Exec,
  1239. provided you haven't run another program on top of it.  You can also exit from
  1240. Kermit-20 by typing one or more control-C's, even if it's in the middle of
  1241. transferring a file.  Kermit-20 will always restore your terminal to its
  1242. original condition, and you will be able to CONTINUE the program to get back
  1243. to "@q(Kermit-20>)" command level with current settings intact.
  1244.  
  1245. @Index<QUIT>
  1246. @q<QUIT> is a synonym for EXIT.
  1247.  
  1248. @Heading<The LOG Command>
  1249.  
  1250. Syntax: @q<LOG> [@i<option> [@i<filespec>]]
  1251.  
  1252. Log the specified option to the specified file:
  1253. @begin<description>
  1254. SESSION@\During CONNECT or execution of a login script, log all characters
  1255. that appear on the screen to the specified file.  During CONNECT, the session
  1256. log can be temporarily turned off during the remote session by typing the
  1257. escape character followed by Q (for Quit logging), and turned on again by
  1258. typing the escape character followed by R (for Resume logging).  Default log is
  1259. @q<SESSION.LOG> in the current directory.
  1260.  
  1261. TRANSACTIONS@\During file transfer, log the progress of each file.  The DEC-20
  1262. transaction log file looks like this:
  1263. @begin<example>
  1264.  
  1265. Kermit-20 Transaction Log File, Monday 27-Feb-1984
  1266.  
  1267. 18:40:13: Opened Log: PS:<TIMREK>SAMPLE.LOG.1
  1268. 18:40:31: -- Send Begins --
  1269.    8th bit prefixing: Off
  1270.    Block check type: 1
  1271. 18:40:31: Opened File: PS:<SY.FDC>LOGIN.CMD.6
  1272.    Sending As "LOGIN.CMD"
  1273.    Sent: 547 7-bit bytes
  1274. 18:40:34: Closed PS:<SY.FDC>LOGIN.CMD.6
  1275. 18:40:34: Send Complete
  1276. 18:40:50: -- Receive Begins --
  1277.    8th bit prefixing: Off
  1278.    Block check type: 1
  1279. 18:40:50: Opened: PS:<TIMREK>AUTOEXEC.BAT.1
  1280.    Written: 186 7-bit bytes
  1281. 18:40:51: Closed: PS:<TIMREK>AUTOEXEC.BAT.1
  1282. 18:40:56: Closed Transaction Log
  1283.  
  1284. @end<example>
  1285. Transaction logging is recommended for long or unattended file transfers, so
  1286. that you don't have to watch the screen.  The log may be inspected after the
  1287. transfer is complete to see what files were transferred and what errors may
  1288. have occurred.  Default log is @q<TRANSACTION.LOG> in the current directory.
  1289.  
  1290. DEBUGGING@\Log STATES or PACKETS, as specified in the most recent SET DEBUGGING
  1291. command, to the specified file.  If log file not specified, then use TTY if
  1292. local, or @q<DEBUGGING.LOG> in the current directory if remote.  If no SET
  1293. DEBUGGING command was previously issued, log STATES to the specified file.
  1294. Also allow specification of bytesize for the log file, 7 (normal, default), or
  1295. 8 (for debugging binary transfers when the parity bit is being used for data),
  1296. for instance
  1297. @example"LOG DEBUGGING BINARY.LOG 8"
  1298. A 7-bit log file can be typed, printed, or examined with a text editor or
  1299. searching program.  An 8-bit log file can only be examined with a system
  1300. utility like FILDDT.  When logging packets, each packet is preceded by a
  1301. timestamp, the current timeout interval (preceded by a slash), and "@q<R:>" or
  1302. "@q<S:>" to indicate data being received and sent, respectively.  Packet format
  1303. is described in the @i<Kermit Protocol Manual>.
  1304.  
  1305. @end<description>
  1306. SESSION is the default option.  Thus the command "LOG" alone will cause CONNECT
  1307. sessions to be logged in @q<SESSION.LOG> in the current directory.  Any log
  1308. files are closed when you EXIT or QUIT from Kermit, and are reactivated if you
  1309. CONTINUE the program.  You may explicitly close a log file and terminate
  1310. logging with the CLOSE command.
  1311.  
  1312. @Heading<The CLOSE Command>
  1313.  
  1314. Syntax: @q<CLOSE> @i<option>
  1315.  
  1316. Close the specified log file, SESSION, TRANSACTION, or DEBUGGING, and terminate
  1317. logging to that file.
  1318.  
  1319. @Section<Login Scripts: The INPUT, OUTPUT, CLEAR, and PAUSE Commands>
  1320.  
  1321. @index<Login Scripts>@index<INPUT>@index<OUTPUT>@index<PAUSE>
  1322.  
  1323. When running Kermit-20 in local mode, connecting from the DEC-20 to another
  1324. system via an external TTY line (for instance, through an autodialer), you may
  1325. use the Kermit-20 INPUT, OUTPUT, CLEAR, and PAUSE commands to carry on a dialog
  1326. with the remote system.  When combined into a "script" in a Kermit-20 TAKE
  1327. command file, or included in a Batch control file, these commands provide the
  1328. ability to initially connect and log in to a remote system, and to set it up
  1329. for file transfer.  During script execution, session logging may be used to
  1330. record the dialog.
  1331.  
  1332. @Heading<The CLEAR Command>
  1333. @index<CLEAR Command>
  1334. Syntax: @q<CLEAR>
  1335.  
  1336. Clear the input and output buffers of the currently selected line, and attempt
  1337. to clear any XOFF deadlock.
  1338.  
  1339. @heading<The PAUSE Command>
  1340. @index<PAUSE Command>
  1341. Syntax: @q<PAUSE> [@i<interval>]
  1342.  
  1343. Pause the specified number of seconds before executing the next command.
  1344. The default interval is one second.
  1345.  
  1346. @Heading<The INPUT Command>
  1347. @index<INPUT Command>
  1348. Syntax: @q<INPUT> [@i<interval>] [@i<string>]
  1349.  
  1350. @index<Timeout> On the currently selected communication line, look
  1351. for the given string for the specified interval of time, which is specified in
  1352. seconds.  If no interval is specified, then wait for the default interval,
  1353. which may be specified by SET INPUT DEFAULT-TIMEOUT, and is normally 5 seconds.
  1354. Specifying an interval of 0 (or less) means no timeout -- wait forever for the
  1355. specified string.  An INPUT command can by interrupted by typing one or more
  1356. Control-C's, which will return you to @q(Kermit-20>) prompt level.
  1357.  
  1358. Characters coming in from the line will be scanned for the search string, and
  1359. when a match is found, the command will terminate successfully; if the string
  1360. is not found within the given interval, the command will terminate
  1361. unsuccessfully.  While the INPUT command is active, all incoming characters
  1362. will appear on your screen.
  1363.  
  1364. The search string may contain any printable characters.  Control or other
  1365. special characters that you could not normally type as part of a command
  1366. may be included by preceding their octal ASCII values
  1367. with a backslash, for instance @q<foo\15> is "foo" followed by a carriage
  1368. return (ASCII 15, octal).  A backslash alone will be taken as is, unless
  1369. it is followed by an octal digit (0-7); if you want to
  1370. actually specify a backslash in this context, double the backslash
  1371. (@q<\\5> will be taken as @q<\5>).
  1372.  
  1373. The behavior of the INPUT command is governed by the SET INPUT CASE,
  1374. SET INPUT DEFAULT-TIMEOUT, and SET INPUT TIMEOUT-ACTION commands, as described
  1375. in the Kermit Commands section of the User Guide, or in the Kermit book.
  1376.  
  1377. In addition to normal use, Kermit-20 scripts can also be used
  1378. in DEC-20 batch control files.  Failure to match an input string in the timeout
  1379. interval will result in a message starting with @qq<?>, which signals the Batch
  1380. controller to detect an error.  If INPUT TIMEOUT-@|ACTION is SET to PROCEED,
  1381. any timeout error messages will be issued starting with a "@q<%>", which
  1382. does not signal an error to Batch.
  1383.  
  1384. In addition to otherwise untypable control characters (like Control-C),
  1385. certain printable characters in the search string may need to be "quoted" using
  1386. the backslash mechanism:
  1387. @begin<description>
  1388. @q<@@> (ASCII 100)@\If it is the first character in the string, atsign tells
  1389. TOPS-20 that the following characters will be the name of an indirect command
  1390. file, for instance 
  1391. @example<input 10 @@foo.txt>
  1392. tells Kermit to spend 10 seconds scanning the communication line input for the
  1393. string which is contained in the file @q<FOO.TXT>.  If you need to specify a
  1394. string that starts with "@q<@@>", use @q<\100> instead.
  1395.  
  1396. @q<?> (ASCII 77)@\A question mark tells TOPS-20 to provide a brief help message
  1397. about this part of the command; use @q<\77> instead.
  1398.  
  1399. @q<!> (ASCII 41)@\If it is the first character in the string, an exclamation
  1400. point will cause TOPS-20 to ignore the rest of the string, i.e. treat it as a
  1401. comment, use @q<\41>.
  1402.  
  1403. @q<;> (ASCII 73)@\Same as exclamation mark, use @q<\73>.
  1404.  
  1405. @q<(> (ASCII 50)@\In first position, TOPS-20 will think this marks the
  1406. beginning of a "guide word"; use @q<\50>.
  1407.  
  1408. @q<-> (ASCII 55)@\In @i<final> position, a dash tells TOPS-20 that the command
  1409. line is to be continued, concatenated with the following line.  Use @q<\55>
  1410. instead of a final dash.  For instance,
  1411. to specify the string "@q<More?-->", use "@q<More\77-\55>".
  1412. @end<description>
  1413.  
  1414. @heading<The OUTPUT Command>
  1415.  
  1416. Syntax: @q<OUTPUT> @i<string>
  1417.  
  1418. The given string is sent out the currently selected communication line.
  1419. The string is in the same form as the INPUT string; control or special
  1420. characters may be included by prefacing their octal ASCII value with a
  1421. backslash.  Note that any terminating carriage return must be included
  1422. explicitly as @q<\15>.  The string will also be echoed at your terminal.
  1423.  
  1424. @Heading<Login Script Hints>
  1425.  
  1426. @index<Passwords>
  1427. It is not a good idea to store passwords in plain text
  1428. in a file.  The facilities of the TOPS-20 command parser make this unnecessary,
  1429. so long as you are sitting at your terminal.  Suppose you have a script
  1430. that looks for the string "@q<Password: >" and then outputs your password
  1431. using a command like
  1432. @example<out mypassword\15>
  1433. If you change this line to
  1434. @example<out @@tty:>
  1435. you may enter the password
  1436. from your terminal as follows:
  1437. @begin<example>
  1438. login: myuserid
  1439. Password: @ux<mypassword\15^Z>
  1440. @end<example>
  1441. @index<Indirect Command File>@index<Password>
  1442. That is, you type the password, a backslash-@|encoded carriage return, and
  1443. then Control-Z.  This may be done even when executing commands from a TAKE
  1444. file; after the @q<^Z>, control returns to the TAKE file.  In the OUTPUT
  1445. command, "@q<@@TTY:> designates @q<TTY:> (your job's controlling terminal) to
  1446. be an indirect command file; the @q<^Z> is the "end of file" for a terminal.
  1447. This same technique could have been used in the first script example to allow
  1448. you to supply from the terminal the name of the file to be sent.  It might
  1449. be a good idea to for you to include an ECHO command in your script file
  1450. to remind you to do this, for instance:
  1451. @begin<example>
  1452. input password:
  1453. echo ^GType your password, followed by "\15" and then a CTRL-Z
  1454. output @@tty:
  1455. @end<example>
  1456. The @q<^G> is a Control-G, which should get your attention by sounding a beep
  1457. at your terminal.
  1458.  
  1459. @index<Raw Upload>@index<Upload>
  1460. One might expect to be able to use the same indirect file mechanism with the
  1461. OUTPUT command to provide a crude "raw upload" facility, as in
  1462. @example<output @@foo.bar>
  1463. to send the contents of the file @q<FOO.BAR> to the remote system, with @i<no>
  1464. synchronization or error checking.  Unfortunately, there are two problems with
  1465. this approach: first, TOPS-20 converts all carriage return / linefeeds in an
  1466. indirect command file to spaces, and second, only very short files may be
  1467. treated this way, because they must fit within TOPS-20's command "atom" buffer.
  1468. @index<TRANSMIT>
  1469. The Kermit-20 TRANSMIT command provides a synchronized raw uploading of files.
  1470.  
  1471. @Section<Raw Download and Upload>
  1472.  
  1473. @index<Raw Download>
  1474. "Raw Download" is the term commonly used to describe the capture of a remote
  1475. file on the local system, without any kind of error detection or correction.
  1476. This allows you to obtain files from remote systems that do not have Kermit,
  1477. but with the risk of loss or corruption of data.
  1478.  
  1479. Kermit-20 provides raw downloading via the LOG SESSION command during CONNECT
  1480. to a remote system.  The session log is described above.  To use session
  1481. logging to capture a file:
  1482. @begin<enumerate>
  1483. Run Kermit on the DEC-20.
  1484.  
  1485. SET LINE to the TTY number through which you will be connected to the remote
  1486. system.
  1487.  
  1488. Perform any required SET commands to condition Kermit for communication with
  1489. the remote system.  You may need SET PARITY, SET DUPLEX, SET FLOW, SET
  1490. HANDSHAKE, etc., depending on the characteristics of the remote system and the
  1491. communication medium.
  1492.  
  1493. CONNECT to the remote system and log in.
  1494.  
  1495. Condition your job on the remote system not to pause at the end of a
  1496. screenful of text, and give whatever commands may be necessary to achieve a
  1497. "clean" terminal listing -- for instance, disable messages from the system or
  1498. other users.
  1499.  
  1500. Type the appropriate command to have the desired file displayed at the
  1501. terminal, @i<but do not type the terminating carriage return>.  On most
  1502. systems, the command would be "type", on Unix it's "cat".
  1503.  
  1504. Escape back to Kermit to the DEC-20 and give the LOG SESSION command.
  1505.  
  1506. CONNECT back to the remote system and type a carriage return.  The file will be
  1507. displayed on your screen and recorded in the session log file.
  1508.  
  1509. Escape back to Kermit on the DEC-20 and give the CLOSE SESSION command.
  1510. @end<enumerate>
  1511. The file will be in @q<SESSION.LOG> in your connected directory, unless you
  1512. gave another name for it in your LOG SESSION command.  You will probably find
  1513. that some editing necessary to remove extraneous prompts, messages, padding
  1514. characters, or terminal escape sequences, or to fill
  1515. in lost or garbled characters.  Here's an example showing how to capture a file
  1516. @q<foo.bar> from a remote Unix system:
  1517. @begin<example>
  1518. @@@ux<kermit>
  1519. Kermit-20>@ux<set line 23>
  1520. Kermit-20>@ux<connect>
  1521. [KERMIT-20: Connecting to remote host over TTY23:,
  1522.  type <CTRL-\>C to return.]
  1523. 4.2 BSD UNIX
  1524.  
  1525. login: @ux<myuserid>
  1526. Password: @ux<mypassword>
  1527. % @ux<cat foo.bar^\C>
  1528. [KERMIT-20: Connection Closed]
  1529. Kermit-20>@ux<log session foo.bar>
  1530. Kermit-20>@ux<connect>
  1531. [KERMIT-20: Connecting to remote host over TTY23:,
  1532.  type <CTRL-\>C to return.]
  1533. [KERMIT-20: Logging to File FOO.BAR.1]
  1534. @i<(Type carriage return now.)>
  1535. This is the file foo.bar.
  1536. It has three lines.
  1537. This is the last line.
  1538. % @ux<^\>
  1539. [KERMIT-20: Closing Log File FOO.BAR.1>
  1540. [KERMIT-20: Connection Closed]
  1541. Kermit-20>@ux<close session>
  1542. @end<example>
  1543. Note that in this case, the Unix "@q<% >" prompt at the end of the text will
  1544. have to be edited out.
  1545.  
  1546. @Heading<Raw Upload>
  1547.  
  1548. "Raw Upload" means sending a file from the local system to a remote one, again
  1549. without error detection or correction.  This allows you to send files from the
  1550. DEC-20 to remote systems that don't have Kermit.  Kermit-20 provides the
  1551. TRANSMIT command for this purpose.
  1552.  
  1553. Syntax: @q<TRANSMIT> @i<filespec> [@i<prompt>]
  1554.  
  1555. @index<TRANSMIT>@index<Raw Upload>
  1556.  For use in local mode only.  Sends the specified text file a line at a time,
  1557. "raw" (as is, @i<without> using Kermit protocol), to the remote system, waiting
  1558. for the specified prompt for each line.  Only a single file may be sent with
  1559. the TRANSMIT command; wildcards are not allowed in the filespec.  The file
  1560. should be a text file, not a binary file.  Since protocol is not being used, no
  1561. assurance can be given that the file will arrive at the destination correctly
  1562. or completely.
  1563.  
  1564. The @i<prompt> is any string, for instance the prompt of a line editor in text
  1565. insertion mode.  The prompt string may include special characters by preceding
  1566. their octal ASCII values with a backslash, e.g. @q<\12> for linefeed, @q<\21>
  1567. for XON (@q<^Q>).  The syntax of the prompt string is explained in greater
  1568. detail above, with the INPUT command.
  1569.  
  1570. @index<Linefeed>@index<Handshake>
  1571. If a prompt string is supplied, alphabetic case will be ignored in searching
  1572. for it unless you SET INPUT CASE OBSERVE.  If a prompt string is not supplied,
  1573. then linefeed will be used by default, unless you have performed a SET
  1574. HANDSHAKE command, in which case the current handshake character will be used.
  1575. If you really want to send the entire file without waiting for any prompts,
  1576. specify a prompt of "\0" (ASCII zero, null) (this is not advised).
  1577.  
  1578. The file will be sent using the current settings for duplex, parity, and flow
  1579. control.  There are no timeouts on input, as there are with the INPUT command.
  1580. The TRANSMIT command waits forever for the prompt to appear.  However, if you
  1581. observe that the transfer is stuck, there are three things you can do:
  1582. @begin<itemize>
  1583. Type a Carriage Return to transmit the next line.
  1584.  
  1585. Type a Control-P to retransmit the line that was just transmitted.
  1586.  
  1587. Type two Control-C's to cancel the TRANSMIT command and get back to
  1588. @q(Kermit-20>) command level.
  1589. @end<itemize>
  1590.  
  1591. TRANSMIT should be used as follows: CONNECT to the remote system, login,
  1592. and start up some kind of process on the remote system to store input from the
  1593. terminal into a file.  On a DEC-20 (that doesn't have Kermit), you could do
  1594. @example<copy tty: foo.bar>
  1595. or you could start a line editor like EDIT or OTTO and put it into text
  1596. insertion mode.  On a Unix system, you could
  1597. @example(cat /dev/tty > foo.bar)
  1598. or you could run "ed" and give it the "a" command.
  1599.  
  1600. The Kermit-20 TRANSMIT command will send the first
  1601. line of the file immediately.  Then it will wait for a "prompt" from the remote
  1602. system before sending the next line.  When performing a copy operation from the
  1603. terminal to a file, the "prompt" will probably be a linefeed, "@q<\12>" which
  1604. is the default prompt -- most full duplex systems expect you to type a line of
  1605. text terminated by a carriage return; they echo the characters you type and
  1606. then output a linefeed.  Half duplex systems, on the other hand, use some kind
  1607. of line turnaround handshake character, like XON (Control-Q), to let you know
  1608. when they are ready for the next line of input.  Line editors like EDIT and
  1609. OTTO prompt you with a line number followed by a tab; in that case your prompt
  1610. character would be "@q<\11>" (be careful -- if the remote DEC-20 doesn't think
  1611. your terminal has hardware tabs, it will simulate them by outputting spaces).
  1612. In any case, to assure synchronization, it is
  1613. your responsibility to set up the target system to accept line-@|at-@|a-@|time
  1614. textual input and to determine what the system's prompt will be when it is
  1615. ready for the next line.
  1616.  
  1617. Each line is sent with a terminating carriage return; linefeeds are not sent,
  1618. since these are supplied by the receiving system if it needs them.  The
  1619. TRANSMIT command continues to send all the lines of the file in this manner
  1620. until it reaches the end, or until you interrupt the operation by typing
  1621. Control-C's.
  1622.  
  1623. If you cannot make the TRANSMIT command work automatically, for instance
  1624. because the remote system's prompt changes for each line, you may TRANSMIT
  1625. manually by specifying a prompt string that will not appear, and then typing a
  1626. carriage return at your keyboard for each line you want to send.
  1627.  
  1628. If the TRANSMIT command completes successfully (you'll get a message to the
  1629. effect that the transmission is complete), then you must connect back to
  1630. the remote system and type whatever command it needs in orderto save and/@|or
  1631. close the file there.
  1632.  
  1633. @Section<Kermit-20 Examples>
  1634.  
  1635. Here are a few examples of the use of Kermit-20.  Text entered by the user is
  1636. underlined.
  1637.  
  1638. @heading<Remote Operation>
  1639.  
  1640. The following example shows use of Kermit-20 as a server from an IBM PC.  In
  1641. this example, the user runs Kermit on the PC, connects to the DEC-20, and
  1642. starts Kermit-20 in server mode.  From that point on, the user need never
  1643. connect to the DEC-20 again.  In this example, the user gets a file from the
  1644. DEC-20, works on it locally at the PC, and then sends the results back to the
  1645. DEC-20.  Note that the user can leave and restart Kermit on the PC as often as
  1646. desired.
  1647. @begin<example,leftmargin +1>
  1648. A>@ux<Kermit>
  1649. Kermit-MS>@ux<connect>
  1650. @@
  1651. @@@ux<Kermit>
  1652. TOPS-20 Kermit version @value(-20version)
  1653.  
  1654. Kermit-20>@ux<server>
  1655.  
  1656.  Kermit Server running on DEC-20 host.  Please type your escape 
  1657.  sequence to return to your local machine.  Shut down the server by 
  1658.  typing the Kermit BYE command on your local machine.
  1659. @ux<^[C>
  1660. Kermit-MS>@ux<get foo.txt>
  1661. @display<@i(The transfer takes place.)>
  1662. Kermit-MS>@ux<exit>
  1663. A>
  1664. A>@ux<edit foo.txt> ; (@i<or whatever>...)
  1665. A>
  1666. A>@ux<Kermit>
  1667. Kermit-MS>@ux<send foo.txt>
  1668. @display<@i(The transfer takes place.)>
  1669. Kermit-MS>@ux<bye>
  1670. A>
  1671. @End(Example)
  1672.  
  1673. The next example shows the special procedure you would have to use in order to
  1674. send a mixture of text and binary files from a PC (or an 8-bit-@|byte system)
  1675. to the DEC-20.  Note that in this case, it's more convenient to avoid server
  1676. mode.
  1677. @Begin(Example,leftmargin +1)
  1678. Kermit-MS>@ux<connect>
  1679. @@
  1680. @@@ux<Kermit>
  1681. TOPS-20 Kermit version @value(-20version)
  1682.  
  1683. Kermit-20>@ux<receive>
  1684. @ux<^]C>
  1685. Kermit-MS>@ux<send *.txt>
  1686. @display<@i(Textual files are sent.)>
  1687.  
  1688. Kermit-MS>@ux<connect>
  1689. Kermit-20>@ux<set file bytesize 8>
  1690. Kermit-20>@ux<receive>
  1691. @ux<^]C>
  1692. Kermit-MS>@ux<send *.exe>
  1693. @display<@i(Binary files are sent.)>
  1694.  
  1695. Kermit-MS>@ux<connect>
  1696. Kermit-20>@ux<exit>
  1697. @@@ux<logout>
  1698. @ux<^]C>
  1699. Kermit-86>@ux<exit>
  1700. A>
  1701. @End(Example)
  1702.  
  1703. @heading<Local Operation>
  1704.  
  1705. In this example, a program DIAL is used to direct an autodialer to call another
  1706. computer (a DECsystem-10); once the connection is made, DIAL starts Kermit with
  1707. an implicit CONNECT command for the appropriate communication line.  DIAL is
  1708. not part of Kermit; if your system has an autodialer, there will be some
  1709. site-@|specific procedure for using it.
  1710. @Begin(Example,leftmargin +1)
  1711. @@@ux<dial>
  1712. Dial>@ux<dial stevens>
  1713. STEVENS, 1-(201) 555-1234, baud:1200
  1714. [confirm]
  1715. Dialing your number, please hold...
  1716. Your party is waiting on TTY11:.
  1717. @@
  1718. @@@u<Kermit>
  1719. TOPS-20 Kermit version @value(-20version)
  1720.  
  1721. Kermit-20>@ux<connect 11>
  1722. [Kermit-20: Connecting over TTY11:, type <CTRL-\>C to return]
  1723.  
  1724. CONNECTING TO HOST SYSTEM.
  1725. Stevens T/S 7.01A(10) 20:20:04 TTY41 system 1282
  1726. Connected to Node DN87S1(101) Line # 57
  1727.  
  1728. Please LOGIN or ATTACH
  1729.  
  1730. .@ux<log 10,35>
  1731. JOB 51 Stevens T/S 7.01A(10) TTY41
  1732. Password: 
  1733. 20:20   15-Dec-83       Thur
  1734.  
  1735. .@ux<r new:Kermit>
  1736.  
  1737. TOPS-10 Kermit version 2(106)
  1738.  
  1739. Kermit-10>@ux<server>
  1740.  
  1741. [Kermit Server running on the DEC host.  Please type your escape 
  1742.  sequence to return to your local machine.  Shut down the server by 
  1743.  typing the Kermit BYE command on your local machine.]
  1744. @ux<^YC>
  1745.  
  1746. [Kermit-20: Connection Closed.  Back at DEC-20.]
  1747.  
  1748. Kermit-20>@ux<set file bytesize 8>
  1749. Kermit-20>@ux<get setdtr.cmd>
  1750. ^A for status report, ^X to cancel file, ^Z to cancel batch.
  1751. SETDTR.CMD.7 @ux<^A>
  1752.  Receiving SETDTR.CMD.7, file bytesize 8
  1753.  (repeated character compression)
  1754.  At page 1
  1755.  Files: 0, packets: 1, chars: 66
  1756.  NAKs: 0, timeouts: 0
  1757. .[OK]
  1758. Kermit-20>bye
  1759. Job 51  User F DA CRUZ [10,35]
  1760. Logged-off TTY41  at 20:22:58  on 15-Dec-83
  1761. Runtime: 0:00:01, KCS:33, Connect time: 0:02:39
  1762. Disk Reads:72, Writes:4, Blocks saved:160
  1763. ....
  1764. Hangup? @ux<y>
  1765. Click. Call duration was 193 seconds to area 201.
  1766. Dial>@ux<exit>
  1767. @End(Example)
  1768. Note the use of Control-A to get a status report during the transfer.
  1769.  
  1770. @section<Installation of Kermit-20>
  1771.  
  1772. Kermit-20 is built from a single MACRO-20 source file, @q<K20MIT.MAC>.
  1773. It requires the standard DEC-@|distributed tools MONSYM, MACSYM, and CMD;
  1774. the following files should be in @q<SYS:> -- @q<MONSYM.UNV, MACSYM.UNV,
  1775. MACREL.REL, CMD.UNV, @r(and) CMD.REL.>  The CMD package is also included with
  1776. the Kermit distribution as @q<K20CMD.*>, in case you can't find it on your
  1777. system.
  1778.  
  1779. The program should work on all TOPS-20 systems as distributed, but many
  1780. customizations are possible.  The site manager may wish to change various
  1781. default parameters on a site-@|wide basis; this may be done simply by changing
  1782. the definitions of the desired symbols, under "subttl Definitions", and
  1783. reassembling.
  1784.  
  1785. The most notable site dependency is the definition of "SET IBM".  As
  1786. distributed from Columbia, Kermit-20 defines "SET IBM" in a built-in SET macro
  1787. definition as "parity mark, duplex half, handshake xon".  This definition may
  1788. be found at MACTAB+1, near the end of the impure data section.  It may be
  1789. changed or deleted, and the program reassembled.
  1790.  
  1791. Sites that do not have ARPANET may wish to delete the TVT-BINARY entries from
  1792. SET command tables, SETABL and SETHLP.
  1793.