@make(manual) @use(database="ERCY02:SCRIBEX") @style(font timesroman12) @libraryfile(misc) @modify(description, spread 1) @string(ckoversion="1.00") @string(NODEBUGLOG="(Debug logging is disabled.)") @string(no="no. ") @define(exx=example,above 2,below 1) @define(mydesc=text,leftmargin +8, indent -8) @define(q=t) @define(qq=t) @begin(text, indent 0) @majorheading(C-Kermit for OS/2) @centre(Version @value) @centre(by Chris Adie et al.) @begin(format, centred) Copyright (C) 1988 Edinburgh University Computing Service. Portions of this document are Copyright (C) 1981, 1988 Trustees of Columbia University in the city of New York. Permission is granted to any individual or institution to use, copy, or redistribute this document so long as it is not sold for profit, and provided this copyright notice is retained. @end(format) @section(Introduction) @subsection(Acknowledgements) C-Kermit was written by Frank da Cruz, Bill Catchings, Jeff Damens and Herm Fischer, with contributions by many others. It was originally written for computers running the Unix operating system, but it has been ported to the VAX running VMS, the Apple Macintosh and the Commodore Amiga, among others. The program was ported to OS/2 by Chris Adie (Edinburgh University Computing Service). This documentation is based closely on the C-Kermit manual by Frank da Cruz and Herm Fischer. The section on the OS/2 file system is based on the MS-Kermit manual, by Christine Gianone, Frank da Cruz and Joe Doupnik. It should be read in conjunction with a more general description of Kermit such as "The Kermit File Transfer Protocol" by Frank da Cruz (Digital Press, ISBN 0-932376-88-6), or the Kermit User Guide, available in machine readable form from your nearest Kermit distribution centre. @subsection C-Kermit provides traditional (Unix-style) command line operation as well as interactive command prompting and execution. The command line options provide access to a basic subset of C-Kermit's capabilities; the interactive command set is far richer. C-Kermit is a protected-mode program. It will not run in the DOS compatability environment. This means that it will continue running (eg transferring files) even when it is not the foreground session. @i(All numbers in the C-Kermit documentation are decimal unless noted otherwise.) @need(32) Summary of capabilities: @begin @tabclear()@tabset(3.5inches,4.0inches) Local operation:@\Yes Remote operation:@\No Login scripts:@\Yes (UUCP style) Transfer text files:@\Yes Transfer binary files:@\Yes Wildcard send:@\Yes File transfer interruption:@\Yes Filename collision avoidance:@\Yes Can time out:@\Yes 8th-bit prefixing:@\Yes Repeat count prefixing:@\Yes Alternate block checks:@\Yes Terminal emulation:@\Yes Communication settings:@\Yes Transmit BREAK:@\Yes Support for dialout modems:@\Yes IBM mainframe communication:@\Yes Transaction logging:@\Yes Session logging:@\Yes Debug logging:@\Yes @value(NODEBUGLOG) Packet logging:@\Yes Act as server:@\Yes Talk to server:@\Yes Advanced server functions:@\Yes Local file management:@\Yes Command/Init files:@\Yes Long packets:@\Yes Sliding Windows:@\No File attributes packets:@\No Command macros:@\No Raw file transmit:@\No @end @subsection(Requirements) C-Kermit will run on a computer with an 80286 or 80386 processor running OS/2 version 1.0 or higher. It runs in character mode - in other words it is not a Presentation Manager application. However, it will run in a Presentation Manager window as a character application. Normally, though, you would run it from the command processor (CMD.EXE) prompt. @subsection(The Serial Port) Naturally, a serial port (COM1 or COM2) is required. The OS/2 Standard Edition comms port device driver must be loaded using a line like one of the following in the CONFIG.SYS file: @begin(example) @tabset(2 inches) @\DEVICE=COM01.SYS @i(or)@\DEVICE=COM02.SYS @end(example) COM01.SYS is used for PC/AT - type machines, while for PS/2s COM02.SYS must be used. C-Kermit @i'will not work' if this device driver is not loaded. (It provides the Category 1 IOCTLs which are used extensively within the program.) The connecting cable and the modem (or other computer, PAD etc to which your computer is connected) must satisfy the requirements of your computer's RS232 interface. In particular, the computer will provide two output control signals (RTS and DTR), and may expect to see signals on four input lines (DCD, DSR, CTS, RI). The precise behaviour of these lines is software configurable (for instance by using the OS/2 '@q(MODE)' command), and C-Kermit makes no attempt to impose a particular method of using them. By default, the DTR and RTS line will both go ON when C-Kermit opens the comms port, and they will go OFF when it is closed. The default behaviour for the input lines is that DSR and CTS must be ON to enable the port to work. If the modem you are connected to does not provide these signals, you can 'loop back' the RTS output signal from the computer to DSR and CTS, using a suitably modified cable. An alternative is to use the MODE command to disable the DSR and CTS inputs. To do this, type a command similar to the following at the OS/2 CMD prompt: @begin(example) MODE COM1:9600,N,8,1,OCTS=OFF,ODSR=OFF,IDSR=OFF @end(example) You can check the effect using: @begin(example) MODE COM1 @end(example) which reports the current settings of COM1. Note that on some machines, C-Kermit may appear to work even although DSR and CTS are not connected to anything, nor disabled using '@q(MODE)'. This is because unconnected input lines tend to 'float high'. Although this situation may not cause any problems, it is not good practice - you should explicitly disable the inputs as above. The '@q(MODE)' utility also allows you to change the baud rate, parity, number of data bits and number of stop bits. C-Kermit provides facilities for changing the baud rate and parity too (see later in this manual), but when it starts up, it resets the parity to none and the number of data bits to 8. Any changes to baud rate and parity will remain in effect after C-Kermit terminates. If you change the parity within C-Kermit, it will ajust the number of data bits to cope. There is no way of changing the number of stop bits within C-Kermit: use '@q(MODE)' to do this. @subsection(Emergency Exit) @begin(quotation) @i(EMERGENCY EXIT:)@index The Control-C key cannot be used to terminate C-Kermit. The Control-Break key will always work, but it takes you back to the Program Selector rather than the CMD.EXE command interpreter from which Kermit was invoked. @end(quotation) @newpage @section(The OS/2 File System) The features of the OS/2 file system of greatest interest to Kermit users are the form of the file specifications, and the formats of the files themselves. Note that the following discussion refers to the MS-DOS compatible file system supported by initial versions of OS/2. Installable file systems are not covered here - they are significantly different, and the extent to which C-Kermit will work under such file systems is unknown (because no installable file system has been released at the time of writing). @subsection(File Specifications) OS/2 file specifications are of the form @exx(@c[DEVICE@q(:\)PATHNAME@q(\)NAME@q(.)TYPE]) where @c{DEVICE} stands for a single character identifier (for instance, @q(A) for the first floppy disk, @q(C) for the first fixed disk, @q(D) for a RAM disk emulator) followed by a colon ('@q(:)'), @c[PATHNAME] is up to 63 characters of identifier(s) (up to 8 characters each) surrounded by backslashes ('@q(\)'), @c[NAME] is an identifier of up to 8 characters, and @c[TYPE] is an identifier of up to 3 characters in length. Device and pathname may be omitted. The first backslash in the pathname may be omitted if the specified path is relative to the current directory. In the path field, '@q(.)' means the current directory, '@q(..)' means the parent directory. Pathname is normally omitted, but can be specified in all C-Kermit commands. Device and directory pathnames, when omitted, default to either the user's current disk and directory, or to the current directory search path as specified in the PATH environment variable, depending on the context in which the file name appears. When this document says that a file is searched for "in the current path," it means that C-Kermit looks on the current disk and directory first, and if the file is not found, then the directories listed in the PATH environment variable are searched. If the PATH environment variable is empty, Kermit looks only at the current disk and directory. @i[NAME.TYPE] is sufficient to specify a file on the current disk and directory, and only this information is sent along by C-Kermit with an outgoing file (by default). The device, path, name, and type fields may contain uppercase letters, digits, and the special characters '@q[-]' (dash), '@q[_]' (underscore), '@q[$]' (dollar sign), '@q[&]' (ampersand), '@q[@hash()]' (number sign), '@q[@@]' (at sign), '@q[!]' (exclamation mark), '@q[']' (single quote), '@q[()]' (parentheses), '@q[{}]' (curly braces), '@q[^]' (caret or circumflex), '@q[~]' (tilde), and '@q[`]' (accent grave). Normally, you should confine your filenames to letters and digits for maximum transportability to non-OS/2 systems (by default, C-Kermit will translate filenames being sent by converting non-alphanumeric characters to '@q(X)'). When you type lowercase letters in filenames, they are converted automatically to uppercase. There are no imbedded or trailing spaces. Other characters may not be included; there is no mechanism for "quoting" otherwise illegal characters in filenames. The fields of the file specification are set off from one another by the punctuation indicated above (ie colon, backslash and dot). The name field is the primary identifier for the file. The type, also called the extension or suffix, is an indicator which, by convention, tells what kind of file we have. For instance @q[FOO.BAS] is the source of a BASIC program named FOO; @q[FOO.OBJ] might be the relocatable object module produced by compiling @q[FOO.BAS]; @q[FOO.EXE] could be an executable program produced by loading @q[FOO.OBJ], and so forth. @q[.EXE] is the normal suffix for executable programs. OS/2 allows a group of files to be specified in a single file specification by including the special "wildcard" characters, '@q[*]' and '@q[?]'. A '@q[*]' matches any string of characters from the current position to the end of the field, including no characters at all; a '@q[?]' matches any single character. Here are some examples: @begin(description) @tabclear()@tabset(1.5 inches) @q[*.BAS]@\All files of type BAS (BASIC source files) in the current directory. @q[FOO.*]@\Files of all types with name FOO. @q[F*.*]@\All files whose names start with F. @q[*.?]@\All files with types exactly one character long, or with no type at all. @end(description) Wildcard notation is used on many computer systems in similar ways, and it is the mechanism most commonly used to instruct Kermit to send a group of files. You should bear in mind that other (non-OS/2) systems may use different wildcard characters. For instance VMS and the DEC-20 use '@q[%]' instead of '@q[?]' as the single character wildcard; when using C-Kermit to request a wildcard file group from a Kermit-20 server, the OS/2 '@q[?]' must be replaced by the DEC-20 '@q[%]'. @subsection(File Formats) OS/2 systems store files as streams of 8-bit bytes, with no particular distinction among text, program code, and binary files. ASCII text files consist of lines separated by carriage-return-linefeed sequences (CRLFs), and this conforms exactly to the way Kermit represents text files during transmission. OS/2 (unlike CP/M) knows the exact end of a file because it keeps a byte count in the directory, so one would expect no particular confusion in this regard. However, certain MS-DOS and OS/2 programs continue to use the CP/M convention of terminating a text file with a Control-Z character. This may cause problems when the file is transferred elsewhere, since other systems may object to the Control-Z. By default, therefore, C-Kermit treats the first Control-Z it finds in the file as being equivalent to end-of-file. The Control-Z is not transmitted to the other system. Of course, this leads to problems when transferring non-text files, when we @i(do) want any Control-Zs in the file to be sent. To achieve this, the C-Kermit '@q(set file type binary)' command may be used. The opposite, '@q(set file type text)', is the default. Non-OS/2 systems may be confused by nonstandard ASCII files sent by C-Kermit: @begin(itemize) Files containing any of the 8-bit "extended ASCII" characters may need conversion (or translation) to 7-bit ASCII. Files produced by word processing programs like Word Perfect or Wordstar may contain special binary formatting codes, and could need conversion to conventional 7-bit ASCII format prior to transmission, using commonly available "exporter" programs. Spreadsheet or database files usually need special formatting to be meaningful to non-OS/2 recipients (though they can be transmitted between OS/2 and MS-DOS systems with Kermit). BASIC programs are normally saved in a binary "tokenized" form. Use BASIC's "@q(,a)" option to save them as regular ASCII text, as in @begin(example) save"foofa",a @end(example) @end(itemize) In general, when attempting to transfer non-text files between OS/2 and a different kind of system, consult the Kermit manual for that system. @newpage @section(File Transfer) When C-Kermit is transferring a file, the screen (stdout) is continously updated to show the progress of the file transer. A dot is printed for every four data packets, other packets are shown by type: @begin(description,leftmargin +6, indent -2, spread 0) I@\Exchange Parameter Information R@\Receive Initiate S@\Send Initiate F@\File Header G@\Generic Server Command C@\Remote Host Command N@\Negative Acknowledgement (NAK) E@\Fatal Error T@\Indicates a timeout occurred Q@\Indicates a damaged, undesired, or illegal packet was received @q<%>@\Indicates a packet was retransmitted @end(description) You may type certain "interrupt" commands during file transfer: @begin(description,leftmargin +16,indent -12,spread 0) Control-F:@\Interrupt the current File, and go on to the next (if any). Control-B:@\Interrupt the entire Batch of files, terminate the transaction. Control-R:@\Resend the current packet. Control-A:@\Display a status report for the current transaction. @end(description) These interrupt characters differ from the ones used in other Kermit implementations to avoid conflict with commonly used Unix shell interrupt characters. This reason, of course, is not valid under OS/2, and in a future version of C-Kermit for OS/2 it is hoped to rectify this. @begin(quotation) @i(CAUTION:)@index(Warning)@index If Control-F or Control-B is used to cancel an incoming file, and a file of the same name previously existed, @i(and) the "file warning" feature is not enabled, then the previous copy of the file will disappear. @end(quotation) The Emergency Exit key (Control-Break) can be used to terminate Kermit in the middle of a file transfer. This will not terminate the transfer gracefully (it is a 'brute force' method), so the remote Kermit system may be left in an undefined state. @newpage @section(Command Line Operation) The C-Kermit command line syntax conforms to the @ux(Proposed Syntax Standards for Unix System Commands) put forth by Kathy Hemenway and Helene Armitage of AT&T Bell Laboratories in @i(Unix/World), Vol.1, No.3, 1984. The implications of this for specifying command-line options are: @begin(itemize,spread 0) An option name is a single character. Options are delimited by '@q(-)'. Options with no arguments may be grouped (bundled) behind one delimiter. Options which take an argument must not have the argument omitted. Arguments immediately follow options, separated by whitespace. The order of options does not matter. A '@q(-)' preceded and followed by whitespace means standard input. A group of bundled options may end with an option that has an argument. @end(itemize) The following notation is used in command descriptions: @begin(description,leftmargin +8,indent -8) @i(fn)@\An OS/2 file specification, possibly containing the "wildcard" characters '@q[*]' or '@q[?]'. @i(fn1)@\An OS/2 file specification which may not contain '@q[*]' or '@q[?]'. @i(rfn)@\A remote file specification in the remote system's own syntax, which may denote a single file or a group of files. @i(rfn1)@\A remote file specification which should denote only a single file. @i(n)@\A decimal number between 0 and 94. @i(c)@\A decimal number between 0 and 127 representing the value of an ASCII character. @i(cc)@\A decimal number between 0 and 31, or else exactly 127, representing the value of an ASCII control character. @q([ ])@\Any field in square braces is optional. @q({x,y,z})@\Alternatives are listed in curly braces. @end(description) C-Kermit command line options may specify any combination of actions and settings. If C-Kermit is invoked with a command line that specifies no actions, then it will issue a prompt and begin interactive dialog. Action options specify either protocol transactions or terminal connection. @subsection(Command Line Options) @begin @q(-s )@i(fn)@\Send the specified file. If @i(fn) is '@q[-]' then kermit sends from standard input, which may come from a file: @example(kermit -s - < foo.bar) or a parallel process: @example(dir *.txt | kermit -s -) You cannot use this mechanism to send console typein. If you want to send a file whose actual name is '@q(-)' you can precede it with a path name, as in @example(kermit -s .\-) The argument @i(fn) may contain wildcards. For instance, @example(kermit -s ck*.h) will send all the files matching the specification '@q(ck*.h)'. @q(-r)@\Receive a file or files. Wait passively for files to arrive. @q(-k)@\Receive (passively) a file or files, sending them to standard output. This option can be used in several ways: @begin(mydesc) @q(kermit -k)@*Displays the incoming files on your screen. @q(kermit -k > )@i(fn1)@*Sends the incoming file or files to the named file, @i(fn1). If more than one file arrives, all are concatenated together into the single file @i(fn1). @q(kermit -k | command)@*Pipes the incoming data (single or multiple files) to the indicated command, as in @example'kermit -k | sort > sorted.txt' @end(mydesc) @q(-a )@i(fn1)@\If you have specified a file transfer option, you may give an alternate name for a single file with the @q(-a) ("as") option. For example, @example'kermit -s foo -a bar' sends the file @q(foo) telling the receiver that its name is @q(bar). If more than one file arrives or is sent, only the first file is affected by the @q(-a) option: @example'kermit -ra baz' stores the first incoming file under the name @q(baz). @q(-x)@\Begin server operation. @end(description) Before proceeding, a few words about remote and local operation are necessary. Kermit (in general, not just C-Kermit) is "local" if it is running on PC or workstation that you are using directly, or if it is running on a multiuser system and transferring files over an external communication line -- not your job's controlling terminal or console. Kermit is remote if it is running on a multiuser system and transferring files over its own controlling terminal's communication line, connected to your PC or workstation. C-Kermit running under OS/2 is always used in local mode, with the serial port at the back of the machine designated for file transfer and terminal connection. Which serial port to use is determined by the @q(-l) command-line option: @begin(description,leftmargin +8,indent -8) @q(-l )@i(dev)@\Line -- Specify a serial line to use for file transfer and terminal connection, as in @example'kermit -l com2' The default line is COM1. @end(description) There are a number of other options associated with the use of the serial port: @begin(description,leftmargin +8,indent -8) @q(-b )@i(n)@\Baud -- Specify the baud rate for the line given in the @q(-l) option, as in @example'kermit -l com2 -b 9600' It is good practice to include this with the @q(-l) option, since the current speed of the serial port might not be what you expect. @q(-p )@i(x)@\Parity -- @i(x) may be one of @q(e),@q(o),@q(m),@q(s),@q(n) (even, odd, mark, space, or none). If parity is other than none, then the 8th-bit prefixing mechanism will be used for transferring 8-bit binary data, provided the opposite Kermit agrees. The default parity is none. @q(-t)@\Specifies half duplex, line turnaround with XON as the handshake character. @end(description) The following command line options access a remote Kermit server: @begin(description,leftmargin +8,indent -8) @q(-g )@i(rfn)@\Actively request a remote server to send the named file or files; @i(rfn) is a file specification in the remote host's own syntax. @q(-f)@\Send a 'finish' command to a remote server. @end(description) The following command line options are to do with connecting to the remote system as a terminal: @begin(description,leftmargin +8,indent -8) @q(-c)@\Establish a terminal connection over the specified or default communication line, before any protocol transaction takes place. Get back to the local system by typing the escape character (normally Control-@q<]>) followed by the letter '@q(c)'. @q(-n)@\Like @q(-c), but @i(after) a protocol transaction takes place; @q(-c) and @q(-n) may both be used in the same command. The use of @q(-n) and @q(-c) is illustrated below. @end(description) Several other command-line options are provided: @begin(description,leftmargin +8,indent -8) @q(-i)@\Specifies that files should be sent or received exactly "as is" with no conversions. This option is necessary for transmitting binary files, and is equivalent to the '@q(set file type binary)' interactive command. @q(-w)@\Write-Protect -- Avoid filename collisions for incoming files. @q(-e @i)@\Extended packet length -- Specify that C-Kermit is allowed to receive packets up to length @i, where @i may be between 10 and some large number, like 1000, depending on the system. The default maximum length for received packets is 90. Packets longer than 94 will be used only if the other Kermit supports, and agrees to use, the "long packet" protocol extension. @q(-q)@\Quiet -- Suppress screen update during file transfer, for instance to allow a file transfer to proceed in the background. @q(-d)@\Debug -- Record debugging information in the file @q(debug.log) in the current directory. Use this option if you believe the program is misbehaving, and show the resulting log to your local Kermit maintainer. @value(NODEBUGLOG) @q(-h)@\Help -- Display a brief synopsis of the command line options. @q(-u @i)@\File handle -- The argument @i is the numerical value of an open file handle which Kermit will use for its communication line. This option is for use only by other programs which interface with Kermit, not for typing in the command line (so it's not described in the help information from @q(-h)). Further details are given in the Appendix. @end(description) The command line may contain no more than one protocol action option (ie only one of: @q(-s), @q(-a), @q(-r), @q(-k), @q(-x), @q(-g), @q(-f)). Files are sent with their own names, except that lowercase letters are raised to upper, drive specifiers and pathnames are stripped off, and non-alphanumeric characters (excepting the dot) are changed to '@q(X)'. Incoming files are stored under their own names. If @q(-w) was specified, a "generation number" is appended to the name if it has the same name as an existing file which would otherwise be overwritten. If the @q(-a) option is included, then the same rules apply to its argument. The file transfer display shows any transformations performed upon filenames. During transmission, files are encoded as follows: @begin(itemize) Control characters are converted to prefixed printables. Sequences of repeated characters are collapsed via repeat counts, if the other Kermit is also capable of repeated-@|character compression. If parity is being used on the communication line, data characters with the 8th (parity) bit on are specially prefixed (provided the other Kermit is capable of 8th-bit prefixing; if not, 8-bit binary files cannot be successfully transferred). @end(itemize) @subsection(Command Line Examples) @exx(kermit -l com1 -b 1200 -cn -r) This command connects you to the system on the other end of COM1 at 1200 baud, where you presumably log in and run Kermit with a '@q(send)' command. After you escape back, C-Kermit waits for a file (or files) to arrive. When the file transfer is completed, you are reconnected to the remote system so that you can logout. @exx(kermit -l com2 -b 9600 -cntp m -r -a foo.bar) This command is like the preceding one, except the remote system in this case uses half duplex communication with mark parity. The first file that arrives is stored under the name @q(foo.bar). @exx(kermit -nf) This command would be used to shut down a remote server and then connect to the remote system, in order to log out or to make further use of it. The @q(-n) option is invoked @i(after) @q(-f) (@q[-c] would have been invoked before). This example assumes that the remote server is connected to COM1 (Kermit's default comms port), and that the current baud rate of the port is acceptable to the remote server. @exx(kermit -wx) This command starts up C-Kermit as a server. Incoming files that have the same names as existing files are given new, unique names. @exx(kermit -l com2 -b 9600) This command sets the communication line and speed. Since no action is specified, C-Kermit issues a prompt and enters an interactive dialog with you. Any settings given on the command line remain in force during the dialog, unless explicitly changed (eg in this case by '@q(set line)' or '@q(set speed)' commands). @exx(kermit) This command starts up Kermit interactively with all default settings. The serial line used will be COM1, and the speed used will be the current speed of COM1. A final example shows how a (hypothetical) OS/2 compression utility might be used to speed up Kermit file transfers: @begin(example) compress < file | kermit -is - @i[(sender)] kermit -ik | uncompress > file @i[(receiver)] @end(example) @subsection(Exit Status Codes) C-Kermit returns an exit status of zero, except when a fatal error is encountered, when the exit status is set to one. This can be used in a batch file, to take some action depending on whether the operation was successful. For instance, suppose the file @q(SEND.CMD) contains the following: @begin(example) echo Sending %1 out port %2 kermit -ql COM%2 -b 9600 -s %1 if ERRORLEVEL 1 goto badend echo Transferred succcessfully! goto end :badend echo Transfer problems! :end @end(example) To send a file @q(FOO.BAS), you could type: @exx(send foo.bas 2) to send it to another computer running Kermit, connected to port COM2. If the transfer completed OK, you would get the message '@q(Transferred successfully!)'. @newpage @section(Interactive Operation) C-Kermit's interactive command prompt is "@q(C-Kermit>)". In response to this prompt, you may type any valid interactive C-Kermit command. C-Kermit executes the command and then prompts you for another command. The process continues until you instruct the program to terminate. Commands begin with a keyword, normally an English verb, such as '@q(send)'. You may omit trailing characters from any keyword, so long as you specify sufficient characters to distinguish it from any other keyword valid in that field. Certain commonly-@|used keywords (such as '@q(send)', '@q(receive)', '@q(connect)') also have special non-@|unique abbreviations ('@q(s)' for '@q(send)', '@q(r)' for '@q(receive)', '@q(c)' for '@q(connect)'). Certain characters have special functions during typein of interactive commands: @Begin(Description,leftmargin +8,indent -4) @q(?)@\Question mark, typed at any point in a command, will produce a message explaining what is possible or expected at that point. Depending on the context, the message may be a brief phrase, a menu of keywords, or a list of files. @q(ESC)@\(The Escape key) -- Request completion of the current keyword or filename, or insertion of a default value. The result will be a beep if the requested operation fails. @q(BS)@\(Backspace) -- Delete the previous character from the command. @q(^W)@\(Control-W) -- Erase the rightmost word from the command line. @q(^U)@\(Control-U) -- Erase the entire command. @q(^R)@\(Control-R) -- Redisplay the current command. @q(SP)@\(Space) -- Delimits fields (keywords, filenames, numbers) within a command. The tab key may also be used for this purpose. @q(CR)@\(Carriage Return or Enter) -- Enters the command for execution. LF (Linefeed or Control-J) or FF (formfeed or Control-L) may also be used for this purpose. @q(^)@\(Circumflex) -- Enter any of the above characters into the command, literally. To enter a @q(^), type two of them in a row (@q[^^]). A circumflex at the end of a command line causes the next line to be treated as a continuation line; this is useful for readability in command files, especially in the 'script' command. @end(description) You may type the editing characters (@q[BS], @q[^W], etc) repeatedly, to delete all the way back to the prompt. No action will be performed until the command is entered by typing carriage return, linefeed, or formfeed. If you make any mistakes, you will receive an informative error message and a new prompt -- make liberal use of '@q[?]' and '@q(ESC)' to feel your way through the commands. One important command is '@q(help)' -- you should use it the first time you run C-Kermit. A command line beginning with a percent sign '@q(%)' is ignored. Such lines may be used to include illustrative commentary in Kermit command dialogs. Interactive C-Kermit accepts commands from files as well as from the keyboard. When you start C-Kermit, the program looks for a file @q(CKERMIT.INI) in the current PATH, and executes any commands it finds there. The commands in @q(CKERMIT.INI) must be in interactive format, not in the command-@|line format. A '@q(take)' command is also provided for use at any time during an interactive session, to allow interactive-format commands to be executed from a file; command files may be nested to any reasonable depth. Here is a brief list of C-Kermit interactive commands: @begin(format,spread 0) @tabclear()@tabset(1.5inches,2.0inches,2.5inches) @>@q(%)@\ Comment @>@q(!)@\ Execute an OS/2 command, or start up CMD.EXE. @>@q(bye)@\ Terminate and log out a remote Kermit server. @>@q(close)@\ Close a log file. @>@q(connect)@\ Establish a terminal connection to a remote system. @>@q(cwd)@\ Change Working Directory. @>@q(dial)@\ Dial a telephone number. @>@q(directory)@\ Display a directory listing. @>@q(echo)@\ Display arguments literally. @>@q(exit)@\ Exit from the program, closing any open files. @>@q(finish)@\ Tell remote Kermit server to exit, but not log out. @>@q(get)@\ Get files from a remote Kermit server. @>@q(help)@\ Display a help message for a given command. @>@q(log)@\ Open log file: debugging, packet, session, transaction. @>@q(quit)@\ Same as 'exit'. @>@q(receive)@\ Passively wait for files to arrive. @>@q(remote)@\ Do some file management on a remote Kermit server. @>@q(script)@\ Execute a login script with a remote system. @>@q(send)@\ Send files. @>@q(server)@\ Begin server operation. @>@q(set)@\ Set various parameters. @>@q(show)@\ Display values of 'set' parameters. @>@q(space)@\ Display current disk space usage. @>@q(statistics)@\ Display statistics about most recent transaction. @>@q(take)@\ Execute commands from a file. @end(format) The 'set' parameters are: @begin(format,spread 0) @tabclear()@tabset(1.5inches,2.0inches,2.5inches) @>@q(block-check)@\ Level of packet error detection. @>@q(delay)@\ How long to wait before sending first packet. @>@q(duplex)@\ Specify which side echoes during '@q(connect)'. @>@q(escape-character)@\ Prefix for "escape commands" during '@q(connect)'. @>@q(file)@\ Set various file parameters. @>@q(flow-control)@\ Communication line full-duplex flow control. @>@q(handshake)@\ Communication line half-duplex turnaround character. @>@q(incomplete)@\ Disposition for incompletely received files. @>@q(line)@\ Communication line device name. @>@q(modem-dialer)@\ Type of modem-dialer on communication line. @>@q(parity)@\ Communication line character parity. @>@q(prompt)@\ The C-Kermit program's interactive command prompt. @>@q(receive)@\ Parameters for inbound packets. @>@q(retry)@\ Packet retransmission limit. @>@q(send)@\ Parameters for outbound packets. @>@q(speed)@\ Communication line speed. @>@q(terminal)@\ Terminal parameters. @end(format) The 'remote' commands are: @begin(format,spread 0) @tabclear()@tabset(1.5inches,2.0inches,2.5inches) @>@q(cwd)@\ Change remote working directory. @>@q(delete)@\ Delete remote files. @>@q(directory)@\ Display a listing of remote file names. @>@q(help)@\ Request help from a remote server. @>@q(host)@\ A command to the remote host in its command language. @>@q(space)@\ Display current disk space usage on remote system. @>@q(type)@\ Display a remote file on your screen. @>@q(who)@\ Show who's logged in, or get information about a user. @end(format) Most of these commands are described adequately in the Kermit User Guide or the Kermit book. Special aspects of certain C-Kermit commands are described below. @string[STXTBS="@tabclear()@tabset(1.2 inches, 3 inches)"] @subsection @value(STXTBS) @begin(format) Syntax:@\@q@i(fn) @i(or)@\@q@i(fn1)@q< >@i @end(format) Send the file or files denoted by @i(fn) to the other Kermit, which should be running as a server, or which should have been given the '@q' command. Each file is sent under its own name (as described above, or as specified by the '@q(set file names)' command). If the second form of the '@q' command is used, i.e. with @i(fn1) denoting a single OS/2 file, @i(rfn1) may be specified as a name to send it under. The '@q' command may be abbreviated to '@q', even though '@q' is not a unique abbreviation for a top-level C-Kermit command. The wildcard characters '@q[*]' and '@q[?]' are accepted in @i(fn). If '@q[?]' is to be included, it must be prefixed by '@q[^]' to override its normal function of providing help. '@q[*]' matches any string, '@q[?]' matches any single character. When @i(fn) contains '@q[*]' or '@q[?]' characters, there is a limit to the number of files that can be matched, which varies depending on the length of the file names involved. If you get the message '@q"Too many files match"' then you'll have to make a more judicious selection. @subsection @value(STXTBS) @begin(format) Syntax:@\@q @i@\@q@i @end(format) Passively wait for files to arrive from the other Kermit, which must be given the '@q' command -- the '@q' command does not work in conjunction with a server (use '@q' for that). If @i(fn1) is specified, store the first incoming file under that name. The '@q' command may be abbreviated to '@q'. If the second form of the command is given, and @i(fn1) contains a path specification, then that path must exist -- C-Kermit will not create a directory for the file. @subsection @value(STXTBS) @begin(format) Syntax:@\@q@i @i@\@q(get) @\@i(rfn) @\@i(fn1) @end(format) Request a remote Kermit server to send the named file or files. Since a remote file specification (or list) might contain spaces, which normally delimit fields of a C-Kermit command, an alternate form of the command is provided to allow the inbound file to be given a new name: type '@q' alone on a line, and you will be prompted separately for the remote and local file specifications, for example @Begin(Example) C-Kermit>@ux(get) Remote file specification: @ux(profile exec) Local name to store it under: @ux(profile.ibm) @End(Example) As with '@q', if more than one file arrives as a result of the '@q' command, only the first will be stored under the alternate name given by @i(fn1); the remaining files will be stored under their own names if possible. If a '@q[?]' is to be included in the remote file specification, you must prefix it with '@q[^]' to suppress its normal function of providing help. If you have started a multiline '@q' command, you may escape from its lower-@|level prompts by typing a carriage return in response to the prompt, e.g. @Begin(Example) C-Kermit>@ux(get) Remote file specification: @ux(foo) Local name to store it under: @i<(Type a carriage return here)> (cancelled) C-Kermit> @End(Example) @subsection(The 'server' command) The '@q' command places C-Kermit in "server mode" on the currently selected communication line. All further commands must arrive as valid Kermit packets from the Kermit on the other end of the line. The OS/2 C-Kermit server can respond to the following commands: @begin(format,spread 0,above 1,below 1) @tabclear()@tabset(2.25inches) @u@\@ux @q(get)@\ Sends files @q(send)@\ Receives files @q(bye)@\ Attempts to log itself out @q(finish)@\ Exits to level from which it was invoked @q(remote directory)@\ Sends directory lising @q(remote delete)@\ Removes files @q(remote cwd)@\ Changes working directory @q(remote type)@\ Sends files to your screen @q(remote space)@\ Reports about its disk usage @q(remote help)@\ Lists these capabilities @q(remote host)@\ Execute an OS/2 command @end(format) Note that the '@q' command should be used with great care. It should only be used to invoke OS/2 commands which produce their output through stdio, and which require no keyboard interaction. Commands such as '@q(copy)' and '@q(rename)' are OK (although they may sometimes produce output on stderr, which will appear on the screen of the OS/2 system). It is not possible to use the '@q' command to run a word proccessor, for instance. @subsection(The 'remote', 'bye', and 'finish' commands) C-Kermit may itself request services from a remote Kermit server. In addition to '@q' and '@q', the following commands may also be sent from C-Kermit to a Kermit server: @begin(mydesc) @q@* If the optional remote directory specification is included, you will be prompted on a separate line for a password, which will not echo as you type it. If the remote system does not require a password for this operation, just type a carriage return. @q@* delete remote file or files. @q@* directory listing of remote files. @q@* issue a command in the remote host's own command language. @q@* disk usage report from the remote host. @q@* display remote file or files on the screen. @q@* display information about who's logged in. @q@* display remote server's capabilities. @q@* When connected to a remote Kermit server, these commands cause the remote server to terminate; '@q' returns it to Kermit or system command level (depending on the implementation or how the program was invoked); '@q' also requests it to log itself out. @end(mydesc) @subsection(The 'log' and 'close' commands) @value(STXTBS) @begin(format) Syntax:@\@q @\@q(close {debugging, packets, session, transactions} ) @end(format) C-Kermit's progress may be logged in various ways. The '@q' command opens a log, the '@q' command closes it. In addition, all open logs are closed by the '@q' and '@q' commands. A name may be specified for a log file; if the name is omitted, the file is created with a default name as shown below. @begin(mydesc) @q@* This produces a voluminous log of the internal workings of C-Kermit, of use to Kermit developers or maintainers in tracking down suspected bugs in the C-Kermit program. Use of this feature dramatically slows down the Kermit protocol. Default name: @q(debug.log). @value(NODEBUGLOG) @q@* This produces a record of all the packets that go in and out of the communication port. This log is of use to Kermit maintainers who are tracking down protocol problems in either C-Kermit or any Kermit that C-Kermit is connected to. Default name: @q(packet.log). @q@* This log will contain a copy of everything you see on your screen during the '@q' command, except for local messages or interaction with local escape commands. Default name: @q(session.log). @q@* The transaction log is a record of all the files that were sent or received while transaction logging was in effect. It includes time stamps and statistics, filename transformations, and records of any errors that may have occurred. The transaction log allows you to have long unattended file transfer sessions without fear of missing some vital screen message. Default name: @q(transact.log). @end(mydesc) The '@q' command explicitly closes a log, e.g. '@q'. @i Debug and Transaction logs are a compile-time option; C-Kermit may be compiled without these logs, in which case it will run faster, it will take up less space on the disk, and the commands relating to them will not be present. @subsection(Local File Management Commands) OS/2 Kermit allows some degree of local file management from interactive command level: @begin(mydesc) @q@* Displays a listing of the names, sizes, and dates of files matching @i(fn) (which defaults to '@q[*.*]'). Equivalent to '@q(dir)'. @q@* Changes Kermit's working directory to the one given. The directory specification may be preceeded by a drive specifier, in which case that becomes the current drive. This command affects only the Kermit process and any processes it may subsequently create. @q@* Display information about disk space and/or quota in the current directory and device. Equivalent to '@q(chkdsk)'. @q@* The command is executed by the OS/2 command interpreter CMD.EXE. If no command is specified, then CMD.EXE itself is started; terminating it by typing 'exit' will return you to C-Kermit command level. Use the '@q(!)' command to provide file management or other functions not explicitly provided by C-Kermit commands. The '@q(!)' command has certain peculiarities: @begin(itemize,spread 0) At least one space must separate the '@q(!)' from the @i(command). A '@q(cd)' or '@q(chdir)' (change directory) command executed in this manner will have no effect on returning to Kermit -- use the C-Kermit '@q(cwd)' command instead. @end(itemize) @end(mydesc) @subsection(The 'set' Command) @value(STXTBS) @begin(format) Syntax:@\@q @end(format) Since Kermit is designed to allow diverse systems to communicate, it is often necessary to issue special instructions to allow the program to adapt to peculiarities of the another system or the communication path. These instructions are accomplished by the '@q' command. The '@q' command may be used to display current settings. Here is a brief synopsis of settings available in the current release of C-Kermit: @begin(mydesc) @q@* Determines the level of per-packet error detection. "1" is a single-@|character 6-bit checksum, folded to include the values of all bits from each character. "2" is a 2-character, 12-bit checksum. "3" is a 3-character, 16-bit cyclic redundancy check (CRC). The higher the block check, the better the error detection and correction and the higher the resulting overhead. Type 1 is most commonly used; it is supported by all Kermit implementations, and it has proven adequate in most circumstances. Types 2 or 3 would be used to advantage when transferring 8-bit binary files over noisy lines. @q@* How many seconds to wait before sending the first packet after a '@q' command, in remote mode only. It is irrelevant for OS/2 Kermit, since it is always in local mode. @q@* For use during '@q'. Specifies which side is doing the echoing; '@q' means the other side, '@q' means C-Kermit must echo typein itself. @q@* For use during '@q' to get C-Kermit's attention. The escape character acts as a prefix to an 'escape command', for instance to close the connection and return to C-Kermit or OS/2 command level. The normal escape character is Control-@q<]> (29). @q@* Establish various file-related parameters: @begin(mydesc) @q@* Normally '@q'; when in local mode, display progress of file transfers on the screen (stdout), and listen to the keyboard for interruptions. If '@q' (equivalent to '@q(-q)' on command line) none of this is done, and the file transfer may proceed in the background oblivious to any other work concurrently done at the console terminal. @q@* Normally '@q, which means that outbound filenames have path specifications stripped and non-alphanumeric characters changed to @q(X)'s (except for the dot). '@q' means that none of these conversions are done; therefore, any directory path appearing in a received file specification must exist and be write-accessible. When literal naming is being used, the sender should not use path names in the file specification unless the same path exists on the target system and is writable. @q@* @begin The file type is normally text, which means that any control-Z in a file being transmitted is treated as an end-of-file mark. Binary means transmit file contents without conversion. Binary ('@q(-i)' in command line notation) is necessary for binary files. The optional trailing parameter tells the bytesize for file transfer. It is 8 by default. If you specify 7, the high order bit will be stripped from each byte of sent and received files. This is useful for transferring text files that may have extraneous high order bits set in their disk representation (e.g. Wordstar or similar word processor files). @end @q@* Normally '@q(off)', which means that incoming files will silently overwrite existing files of the same name. When '@q(on)' ('@q(-w)' on command line) Kermit will check if an arriving file would overwrite an existing file; if so, it will construct a new name for the arriving file, of the form @q(FZZ)@i(n)@q(.BAR), where @q(FZZ.BAR) is the name they share and @i(n) is a "generation number"; if @q(FZZ.BAR) exists, then the new file will be called @q(FZZ00001.BAR). If @q(FZZ.BAR) and @q(FZZ00001.BAR) exist, the new file will be @q(FZZ00002.BAR), and so on. If the common name were more than 6 characters long (eg @q(GOODDATA.DAT)), then the new name for the arriving file would be @q(GOODD001.DAT) and so on. @begin(quotation) @i(CAUTION:) If Control-F or Control-B is used to cancel an incoming file, and a file of the same name previously existed, @i(and) the "file warning" feature is not enabled, then the previous copy of the file will disappear. @end(quotation) @end(mydesc) @q@* Normally '@q' for full duplex flow control. Should be set to '@q' if the other system cannot do xon/xoff flow control, or if you have issued a '@q' command. If set to '@q(xon/xoff)', then '@q(handshake)' should be set to '@q(none)'. This setting applies during both terminal connection and file transfer. @q@* Disposition for incompletely received files. If an incoming file is interrupted or an error occurs during transfer, the part that was received so far is normally discarded. If you '@q(set incomplete keep)' then such file fragments will be kept. @q@* Normally '@q(none)'. Otherwise, half-duplex communication line turnaround handshaking is done, which means Kermit will not reply to a packet until it has received the indicated handshake character or has timed out waiting for it; the handshake setting applies only during file transfer. If you '@q(set handshake)' to other than '@q(none)', then '@q(flow)' should be set to '@q(none)'. @q@* The device name for the communication line to be used for file transfer and terminal connection, e.g. @q(COM2). If you omit the device name, Kermit will revert to its default device, @q(COM1). @q@* The type of modem dialer on the communication line. '@q(direct)' indicates either there is no dialout modem, or that if the line requires carrier detection to open, then 'set line' will hang waiting for an incoming call. '@q"hayes"', '@q"ventel"', and the others indicate that '@q' (or the '@q(-l)' argument) will prepare for a subsequent '@q' command for the given dialer. Support for new dialers is added from time to time, so type '@q' for a list of those supported in your copy of Kermit. See the description of the '@q(dial)' command. @q@* Specify character parity for use in packets and terminal connection, normally '@q(none)'. If other than '@q(none)', C-Kermit will seek to use the 8th-bit prefixing mechanism for transferring 8-bit binary data, which can be used successfully only if the other Kermit agrees; if not, 8-bit binary data cannot be successfully transferred. @q@* The given string will be substituted for '@q(C-Kermit>)' as this program's prompt. If the string is omitted, the prompt will revert to '@q(C-Kermit>)'. If the string is enclosed in double quotes, the quotes will be stripped and any leading and trailing blanks will be retained. @q@* Establish parameters to use when sending packets. These will be in effect only for the initial packet sent, since the other Kermit may override these parameters during the protocol parameter exchange (unless noted below). @begin(mydesc) @q@* Specifies the control character needed by the other Kermit to recognize the end of a packet. C-Kermit sends this character at the end of each packet. Normally 13 (carriage return), which most Kermit implementations require. Other Kermits require no terminator at all, still others may require a different terminator, like linefeed (10). @q@* Specify the maximum packet length to send. Normally 90. Shorter packet lengths can be useful on noisy lines, or with systems or front ends or networks that have small buffers. The shorter the packet, the higher the overhead, but the lower the chance of a packet being corrupted by noise, and the less time to retransmit corrupted packets. This command overrides the value requested by the other Kermit during protocol initiation unless the other Kermit requests a shorter length. @q@* Designate a character to send before each packet. Normally, none is sent. Outbound padding is sometimes necessary for communicating with slow half duplex systems that provide no other means of line turnaround control. It can also be used to send special characters to communications equipment that needs to be put in "transparent" or "no echo" mode, when this can be accomplished in by feeding it a certain control character. @q@* How many pad characters to send, normally 0. @q@* The normal Kermit packet prefix is Control-A (1); this command changes the prefix C-Kermit puts on outbound packets. The only reasons this should ever be changed would be: Some piece of equipment somewhere between the two Kermit programs will not pass through a Control-A; or, some piece of of equipment similarly placed is echoing its input. In the latter case, the recipient of such an echo can change the packet prefix for outbound packets to be different from that of arriving packets, so that the echoed packets will be ignored. The opposite Kermit must also be told to change the prefix for its inbound packets. @q@* Specifies the number of seconds you want the other Kermit to wait for a packet before timing it out and requesting retransmission. Defaults to 10 seconds. @end(mydesc) @q>@* Establish parameters to request the other Kermit to use when sending packets. @begin(mydesc) @q@* Requests the other Kermit to terminate its packets with the specified character. @q@* Specify the maximum packet length to that you want the other Kermit to send, normally 90. If you specify a length of 95 or greater, then it will be used if the other Kermit supports, and agrees to use, the Kermit protocol extension for long packets. In this case, the maximum length depends upon the systems involved, but there would normally be no reason for packets to be more than about 1000 characters in length. The '@q' command displays C-Kermit's current and maximum packet lengths. @q@* C-Kermit normally does not need to have incoming packets preceded with pad characters. This command allows C-Kermit to request the other Kermit to use @i(cc) as a pad character. Default @i(cc) is NUL, ASCII 0. @q@* How many pad characters to ask for, normally 0. @q@* Change the prefix C-Kermit looks for on inbound packets to correspond with what the other Kermit is sending. @q@* Normally, each Kermit partner sets its packet timeout interval based on what the opposite Kermit requests. This command allows you to override the normal procedure and specify a timeout interval for OS/2 Kermit to use when waiting for packets from the other Kermit. If you specify 0, then no timeouts will occur, and OS/2 Kermit will wait forever for expected packets to arrive. @end(mydesc) @q@* The baud rate for the external communication line. '@q' is a synomym for '@q'. 19200 baud may not be available, depending on your communications hardware. @q@* Used for specifying terminal parameters. Currently, '@q' is the only parameter provided, and it can be set to 7 or 8. This controls the width of the data path between the console and the remote system when C-Kermit is in connect (ie terminal emulation) mode. It's 7 by default. @end(mydesc) @subsection(The 'show' Command) @value(STXTBS) @begin(format) Syntax:@\@q @end(format) The '@q' command with the default argument of '@q' displays the values of all the '@q' parameters described above. If you type '@q', then C-Kermit will display the version numbers and dates of all its internal modules. You should use the '@q' command to ascertain the vintage of your Kermit program before reporting problems to Kermit maintainers. @subsection(The 'statistics' Command) The statistics command displays information about the most recent Kermit protocol transaction, including file and communication line i/o, timing and efficiency, as well as what encoding options were in effect (such as 8th-bit prefixing, repeat-@|count compression). @subsection(The 'take' and 'echo' Commands) @value(STXTBS) @begin(format) Syntax:@\@q@i@* @\@q@i<[text to be echoed]> @end(format) The '@q' command instructs C-Kermit to execute commands from the named file. The file may contain any interactive C-Kermit commands, including '@q'; command files may be nested to any reasonable depth, but it may not contain text to be sent to a remote system during the '@q' command. This means that a command file like this: @begin(example) set speed 9600 connect login myuserid mypassword @i @end(example) will @i(not) send "login myserid" or any of the following text to the remote system. To carry on a canned dialog, use the '@q