home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / archives / ckc192.zip / CKERMIT.BWR < prev    next >
Text File  |  1996-11-29  |  48KB  |  982 lines

  1. CKERMIT.BWR          "Beware File" for C-Kermit Version 6.0        -*- text -*-
  2.  
  3. As of C-Kermit version:  6.0.192
  4. This file last updated:  Fri Sep  6 23:23:23 1996
  5.  
  6. Authors: Frank da Cruz and Christine M. Gianone, Columbia University.
  7.  
  8.   Copyright (C) 1985, 1996, Trustees of Columbia University in the City of New
  9.   York.  The C-Kermit software may not be, in whole or in part, licensed or
  10.   sold for profit as a software product itself, nor may it be included in or
  11.   distributed with commercial products or otherwise distributed by commercial
  12.   concerns to their clients or customers without written permission of the
  13.   Office of Kermit Development and Distribution, Columbia University.  This
  14.   copyright notice must not be removed, altered, or obscured.
  15.  
  16. Report problems, suggestions, fixes, etc, to Frank da Cruz:
  17.  
  18.   The Kermit Project
  19.   Columbia University
  20.   612 West 115th Street
  21.   New York NY 10025-7799  USA
  22.   Email: fdc@columbia.edu
  23.  
  24. C-Kermit 6.0 is documented in the book "Using C-Kermit" by Frank da Cruz and
  25. Christine M. Gianone, Second Edition, 1997, Digital Press / Butterworth-
  26. Heinemann, Woburn, MA, USA, ISBN 1-55558-164-1.  Price: US $39.95.  Available
  27. in book and computer stores, or order by phone, call Columbia University at
  28. +1 212 854-3703, or Butterworth-Heinemann at +1 800 366-2665.  A German edition
  29. is available from Verlag Heinz Heise in Hannover, Germany.
  30.  
  31.  
  32. WHAT IS IN THIS FILE
  33.  
  34. This is the "beware file" for C-Kermit.  It contains hints and tips,
  35. frequently asked questions (and answers), troubleshooting advice, limitations
  36. and restrictions, known bugs, etc, that apply to all C-Kermit variations.
  37. This file is supplemented by a system-specific "beware file" for each major
  38. system where C-Kermit runs:
  39.  
  40.   ckuker.bwr - All variations of UNIX: HP-UX, AIX, SCO, Solaris, etc.
  41.   ckoker.bwr - IBM OS/2
  42.   ckvker.bwr - Digital Equipment Corporation VMS and OpenVMS
  43.   cklker.bwr - Stratus VOS
  44.   ckdker.bwr - Data General AOS/VS
  45.   ckmker.bwr - Apple Macintosh
  46.   ckiker.bwr - Commodore Amiga
  47.   cksker.bwr - Atari ST
  48.   ck9ker.bwr - Microware OS-9
  49.   ckpker.bwr - Bell Labs Plan 9
  50.  
  51. This file contains the following sections:
  52.  
  53.    (1) INCOMPATIBILE CHANGES IN VERSION 6.0
  54.    (2) THE C-KERMIT COMMAND PARSER
  55.    (3) MULTIPLE SESSIONS
  56.    (4) NETWORK COMMUNICATION
  57.    (5) THE SERVICES DIRECTORY
  58.    (6) MODEMS AND DIALING
  59.    (7) DIALING HINTS AND TIPS
  60.    (8) TERMINAL SERVERS
  61.    (9) TERMINAL EMULATION
  62.   (10) KEY MAPPING
  63.   (11) THE TRANSMIT COMMAND
  64.   (12) FILE TRANSFER
  65.   (13) SCRIPT PROGRAMMING
  66.  
  67.  
  68. (1) INCOMPATIBILE CHANGES IN VERSION 6.0
  69.  
  70. This is not necessarily an exhaustive list.
  71.  
  72.  . Unless you tell C-Kermit otherwise, if a serial or network connection
  73.    seems to be open, and you attempt to EXIT or to SET LINE or SET HOST or
  74.    TELNET, C-Kermit warns you that an active connection appears to be open
  75.    and asks you if you really want to close it.  If you do not want these
  76.    warnings, add SET EXIT WARNING OFF to your customization file.
  77.  
  78.  . The default for SET { SEND, RECEIVE } PATHNAMES was changed from ON
  79.    to OFF, to prevent unexpected creation of directories and depositing of
  80.    incoming files in places you might not know to look.
  81.  
  82.  . The default for SET FILE INCOMPLETE was changed from DISCARD to KEEP to
  83.    allow for file transfer recovery.
  84.  
  85.  . The default file-transfer block-check is now 3, rather than 1.
  86.  
  87.  . The default flow-control is now "auto" ("do the right thing"), not Xon/Xoff.
  88.  
  89.  . Backslash (\) is no longer a line continuation character.
  90.  
  91.  . Negative INPUT timeout now results in infinite wait, rather than 1 second.
  92.  
  93. (2) THE C-KERMIT COMMAND PARSER
  94.  
  95. When using the command-line processor ("kermit -l /dev/tty00 -b 19200", etc),
  96. note that in some cases the order of the command-line options makes a
  97. difference, contrary to the expectation that order of command-line options
  98. should not matter.  In this case, the -b option must be given after the -l
  99. option if it is to have any effect.
  100.  
  101. If you specify an alternate initialization file on the command line (using the
  102. -y option) and the file doesn't exist or can't be opened, no error is reported.
  103.  
  104. In the interactive command parser:
  105.  
  106.  . VMS-style command editing (arrow keys, etc) is not supported.
  107.  . EMACS- or VI-style command line editing is not supported.
  108.  . Editing keys are hardwired (Ctrl-U, Ctrl-W, etc).
  109.  
  110. If you interrupt C-Kermit before it has issued its first prompt, it will exit.
  111. This means that you cannot interrupt execution of the initialization file, or
  112. of an "application file" (file whose name is given as the first command-line
  113. argument), or of an alternative initialization file ("-y filename"), and get
  114. to the prompt.  There is, however, one exception to this rule: you *can*
  115. interrupt commands -- including TAKE commands -- given in the '-C "command
  116. list"' command-line argument and -- if there were no action commands among the
  117. command-line arguments -- you will be returned to the C-Kermit prompt.  So,
  118. for example, if you want to start C-Kermit in such a way that it executes a
  119. command file before issuing its first prompt, and you also want to be able to
  120. interrupt the command file and get to the prompt, include a TAKE command for
  121. the desired command in the -C argument, for example:
  122.  
  123.    kermit -C "take dial.scr"
  124.  
  125. Reportedly, if you attempt to interrupt Kermit while it is executing its
  126. initialization file, and you do this rapidly enough, e.g. by sending a
  127. constant stream of Ctrl-C's at a very high rate of speed, depending on the
  128. underlying operating system (reported only on a couple versions of UNIX),
  129. duplicate Kermit processes might be created -- cause unknown, cure unknown,
  130. workaround: don't do it.
  131.  
  132. If you use the backslash (\) prefix to enter a control character, space, or
  133. question mark into a command literally, the backslash disappears and is
  134. replaced by the quoted character.  If it was a control character, it is shown
  135. as a circumflex (^).  This allows editing (backspace, delete, Ctrl-W) to work
  136. correctly even for control characters.
  137.  
  138. The only way to include a comma literally in a macro definition -- as opposed
  139. to having it separate commands within the definition -- is to enter its ASCII
  140. value (44) in backslash notation, e.g.:
  141.  
  142.   DEFINE ROWS MODE CO80\{44}\%1
  143.  
  144. If you quote special characters in a filename (e.g. in the SEND command),
  145. filename completion may seem to work incorrectly.  For example, if you have a
  146. file whose name is a*b (the name really contains an asterisk), and you type
  147. "send a\\*<ESC>", the "b" will not appear, nor will Ctrl-R redisplay the
  148. completed name correctly.  But internally the file name is recognized anyway.
  149.  
  150. Question-mark help does not work during execution of an ASKQ command.  The
  151. question marks are simply accepted as text.
  152.  
  153. The maximum length for a variable name is 20 characters.  For array
  154. declarations and references, that includes the subscript.  So, for example:
  155.  
  156.   \%a[\m(max_services)]
  157.  
  158. is one character too long (this can be changed by redefining the symbol VNAML
  159. in ckuusr.h and recompiling C-Kermit).
  160.  
  161. Some other maximums to watch out for:      Symbol    Value Defined in
  162.                                      
  163.  Nesting level for command files:           MAXTAKE      30  ckuusr.h
  164.  Nesting level for macros:                  MACLEVEL     50  ckuusr.h
  165.  Nesting level for FOR / WHILE loops:       FORDEPTH     10  ckuusr.h
  166.  Number of macros:                          MAC_MAX     256  ckuusr.h
  167.  Size of INPUT buffer:                      INPBUFSIZ   256  ckuusr.h
  168.  Maximum files to match a wildcard:         MAXWLD   varies  ck?fio.c
  169.  Filespecs in MSEND command:                MSENDMAX    100  ckuusr.h
  170.  Length of MSEND or GET string:             FSPECL      300  ckuusr.h
  171.  Length for GOTO target label:              LBLSIZ       50  ckuusr.h
  172.  Number of characters in a command:         CMDBL      1024  ckucmd.h
  173.  Number of chars in a field of a command:   ATMBL       256  ckucmd.h
  174.  \fexecute() recursion depth limit:         CMDDEP       20  ckucmd.h
  175.  
  176. ASK and ASKQ strip leading and trailing spaces from what the user types.  This
  177. happens way down deep in the command parser -- it's nothing special about ASK
  178. and friends.  The only way around this that works in both C-Kermit and MS-DOS
  179. Kermit is for the user (the one who is responding to the ASK prompt) to type
  180. (the first) leading space as "\32" and the (final) trailing space as "\32".
  181. In this example, the password begins with 2 leading blanks and ends with two
  182. trailing blanks, and "Passwd:" is the ASK prompt:
  183.  
  184.  Passwd:\32 secret \32
  185.  
  186. Of course, the user could also type *all* blanks as \32.
  187.  
  188. In OUTPUT commands only, \B and \\B send a BREAK signal, and \L and \\L send a
  189. Long BREAK signal, and \N and \\N send a NUL (ASCII 0).  BREAK and Long BREAK
  190. are special signals, not characters, and NUL is a character that normally
  191. cannot be included in a C string, since it is the C string terminator.
  192.  
  193. If you really want to output a backslash followed by a B, an L, or an N (as is
  194. needed to configure certain modems, etc), use "output \\B".
  195.  
  196.  
  197. (3) MULTIPLE SESSIONS
  198.  
  199. C-Kermit does not support multiple sessions.  When you SET LINE (or SET PORT,
  200. same thing) to a new device, or SET HOST to a new host, the previous SET LINE
  201. device or network host connection is closed, resulting in hangup of the modem
  202. or termination of the network connection.  In windowing environments like
  203. HP-VUE, NeXTSTEP, OS/2, etc, you can run separate copies of Kermit in different
  204. windows to achieve multiple sessions.
  205.  
  206. To achieve multiple sessions through a single serial port (e.g. when dialing
  207. up), you can install SLIP or PPP on your computer and then use C-Kermit's
  208. TCP/IP support over the SLIP or PPP connection, assuming you also have
  209. TCP/IP networking installed on your computer.
  210.  
  211. On UNIX systems that support the "term" program, you can establish a
  212. connection to another UNIX system with C-Kermit and then achieve multiple
  213. sessions using "term" client programs like trsh (see ckuker.bwr and the term
  214. documentation for details).
  215.  
  216.  
  217. (4) NETWORK COMMUNICATION
  218.  
  219. In multiuser operating systems such as UNIX and VMS, TCP/IP RLOGIN connections
  220. are available only to privileged users, since "login" is a privileged socket.
  221. And assuming you are allowed to use it in the first place, it is likely to
  222. behave differently depending on what type of host you are rlogging in to, due
  223. to technical reasons having to do with conflicting interpretations of RFC793
  224. (Out-Of-Band Data) and Rlogin (RFC1122)...  "Specifically, the TCP urgent
  225. pointer in BSD points to the byte after the urgent data byte, and an
  226. RFC-compliant TCP urgent pointer points to the urgent data byte. As a result,
  227. if an application sends urgent data from a BSD-compatible implementation to an
  228. RFC-1122 compatible implementation then the receiver will read the wrong
  229. urgent data byte (it will read the byte located after the correct byte in the
  230. data stream as the urgent data byte)."  Rlogin requires the use of OOB data
  231. while Telnet does not.  Therefore, it is possible for Telnet to work between
  232. all systems while BSD and System V TCP/IP implementation are almost always a
  233. bad mix.
  234.  
  235. On a TCP/IP TELNET connection, you should normally have PARITY set to NONE and
  236. (except in VMS C-Kermit) FLOW-CONTROL also set to NONE.  If file transfer does
  237. not work with these settings (for example, because the remote TELNET server
  238. only gives a 7-bit data path), use SET PARITY SPACE.  Do not use SET PARITY
  239. MARK, EVEN, or ODD on a TELNET connection -- it interferes with TELNET
  240. protocol.
  241.  
  242. If echoing does not work right after connecting to a network host or after
  243. dialing through a TCP/IP modem server, it probably means that the TELNET
  244. server on the far end of the connection is executing the TELNET protocol
  245. incorrectly.  After initially connecting and discovering incorrect echoing
  246. (characters are echoed twice, or not at all), escape back, give the
  247. appropriate SET DUPLEX command (FULL or HALF), and then CONNECT again.
  248. For a consistently misbehaving connection, you can automate this process in
  249. a macro or TAKE file.
  250.  
  251. TELNET sessions are treated just like serial communications sessions as far as
  252. "terminal bytesize" and "command bytesize" are concerned.  If you need to view
  253. and/or enter 8-bit characters during a TELNET session, you must tell C-Kermit
  254. to SET TERMINAL BYTESIZE 8, SET COMMAND BYTESIZE 8, and SET PARITY NONE.
  255.  
  256. If you SET TERMINAL DEBUG ON or SET DEBUG SESSION (same thing), TELNET
  257. protocol negotiations will be displayed on your screen.  But most of the
  258. interesting negotiations happen at the time the SET HOST or TELNET command
  259. is given, before CONNECT mode is entered, so you won't see them on your
  260. screen.  However, you can still capture them in the debug log ("log debug").
  261.  
  262. C-Kermit version 6.0 has a new set of SET TCP commands, to control TCP-level
  263. parameters, such as "keepalive" protocol (that allows C-Kermit to detect
  264. more quickly and reliably when a connection is broken).  In case you should
  265. see a message like:
  266.  
  267.   Could not get SO_KEEPALIVE: Protocol not available
  268.  
  269. it means that the underlying TCP/IP stack does not support this feature.
  270. Don't worry, no harm is done.  You can make this message go away by adding:
  271.  
  272.   SET TCP KEEPALIVE OFF
  273.  
  274. Similarly for the other SET TCP commands.
  275.  
  276.  
  277. (5) THE SERVICES DIRECTORY
  278.  
  279. Until edit 190, the login macros (such as UNIXLOGIN, VMSLOGIN, etc), which are
  280. used in the services directory, had their respective system prompts
  281. hard-coded, so if the prompt on the system you were logging in to differed
  282. from the one in the macro, the macro would time out and report failure (even
  283. though it actually did log you in).  These macros have been changed in edit
  284. 190 to allow you to override the default prompt.  As explained on pp.297-301
  285. of "Using C-Kermit", the format of a services directory entry is:
  286.  
  287.   entry-name  login-macro-name  user-id  connection-macro-name + arguments
  288.  
  289. For example:
  290.  
  291.   chemistry   vmslogin   ivan   call hayes com1 2400 7654321
  292.  
  293. If you want to specify the system prompt to look for after logging in, you
  294. can do it by grouping it after the login macro name in braces, like this:
  295.  
  296.   chemistry   {vmslogin CHEM:}  ivan   call hayes com1 2400 7654321
  297.  
  298. For reference, here are the standard login macros and the default prompts:
  299.  
  300.   UNIXLOGIN     \13\10$\32  (i.e. CR, LF, dollar sign, space)
  301.   VMSLOGIN      \13\10$\32  (ditto)
  302.   CISLOGIN      CompuServe Information Service
  303.   DOWLOGIN      ENTER QUERY
  304.   VMLINELOGIN   (Not applicable)
  305.   VMFULLOGIN    (Not applicable)
  306.  
  307.  
  308. (6) MODEMS AND DIALING
  309.  
  310. (Also see MODEMS.DOC and DIALING.DOC)
  311.  
  312. The list of modem types supported by C-Kermit is obtained by typing:
  313.  
  314.   set modem type ?
  315.  
  316. at the C-Kermit> prompt.  Note that the ITU-T (V.25bis) modem type is only
  317. for asynchronous mode, not synchronous (HDLC) mode -- there is no support
  318. in C-Kermit for synchronous communication (except for SET NET X.25, which
  319. is available in SunOS and Solaris with SunLink X.25, and in Stratus VOS,
  320. but that still has nothing to do with V.25bis modems).
  321.  
  322. If you have a high-speed, error-correcting, data-compressing modem, you should
  323. generally use the following settings:
  324.  
  325.   set speed 57600 ; Or 38400, the highest supported by both Kermit & the modem
  326.   set modem speed-matching off  ; Use speed buffering.
  327.   set modem error-correction on ; Enable error-correction and compression.
  328.   set modem data-compression on
  329.  
  330. An important change in C-Kermit 6.0 is that when you give a SET MODEM TYPE
  331. command to tell Kermit what kind of modem you have, Kermit also sets a number
  332. of other modem-related parameters automatically from its internal modem
  333. database.  Thus, the order in which you give modem-related commands is
  334. significant, whereas in prior releases they could be given in any order.
  335.  
  336. The new default for flow control is "auto", meaning "do the right thing".
  337. So (for example) if your version of C-Kermit supports SET FLOW RTS/CTS and
  338. your modem also supports RTS/CTS, then Kermit will automatically set its
  339. flow control to RTS/CTS *and* set modem's flow control to RTS/CTS too before
  340. attempting to use the modem.
  341.  
  342. ADDING NEW MODEM TYPES TO C-KERMIT (see MODEMS.DOC)
  343.  
  344.  
  345. (7) DIALING HINTS AND TIPS
  346.  
  347. (Also see DIALING.DOC)
  348.  
  349. Remember: In many C-Kermit implementations (depending on the underlying
  350. operating system -- mostly Windows, OS/2, and System-V-based UNIX versions),
  351. you can't CONNECT to a modem and type the modem's dialing command (like
  352. "ATDT7654321") manually, unless you first tell C-Kermit to:
  353.  
  354.   SET CARRIER-WATCH OFF
  355.  
  356. This is because (in these implementations), the CONNECT command requires the
  357. modem's Carrier Detect (CD) signal to be on, but the CD signal doesn't come on
  358. until after dialing is complete.  This requirement is what allows C-Kermit to
  359. pop back to its prompt automatically when the connection is hung up.  See the
  360. description of SET CARRIER in "Using C-Kermit".
  361.  
  362. Similarly, if your dialed connection drops when CARRIER-WATCH is set to AUTO
  363. or ON, you can't CONNECT back to the (now disconnected) screen to see what
  364. might have happened unless you first SET CARRIER-WATCH OFF.
  365.  
  366. Don't SET FLOW RTS/CTS if your modem is turned off, or if it is not presenting
  367. the CTS signal.  Otherwise, the serial device driver might get stuck waiting
  368. for this signal to appear.
  369.  
  370. Here are a few points to clarify the purpose of SET MODEM SPEED-MATCHING:
  371.  
  372.  0. The name was changed from SET DIAL SPEED-MATCHING to SET MODEM
  373.     SPEED-MATCHING in edit 192, as part of the overhaul of the dialing
  374.     features.
  375.  
  376.  1. This command does not do anything at all to the modem.  Rather, it is used
  377.     to inform C-Kermit about the modem's configuration: whether the modem's
  378.     interface speed is "fixed", or it changes its interface speed when a
  379.     connection is made.  In the latter case, C-Kermit changes its own speed in
  380.     response to the speed given in the modem's CONNECT message.  By default,
  381.     SPEED-MATCHING is ON, so Kermit does indeed attempt to change its speed.
  382.     If your modem is set to have a fixed interface speed, you must SET MODEM
  383.     SPEED-MATCHING OFF.
  384.  
  385.  2. When MODEM SPEED-MATCHING is ON:
  386.  
  387.     (a) Your modem must be configured to report its *interface* speed in the
  388.         CONNECT message, rather than the connection (modulation) speed.
  389.  
  390.     (b) Your computer (and C-Kermit) must support all connection speeds that
  391.         might be reported by your modem.  SET SPEED ? will give you a list of
  392.         the speeds that your version of C-Kermit knows about.
  393.  
  394.  3. If conditions (a) and (b) cannot be satisfied, then you must:
  395.  
  396.     (a) Configure your modem to lock its interface speed
  397.  
  398.     (b) Tell C-Kermit to SET MODEM SPEED-MATCHING OFF
  399.  
  400. To illustrate, suppose you have a V.32bis modem.  When it connects to a
  401. remote V.32bis modem, it might issue a message like:
  402.  
  403.   CONNECT 14400
  404.  
  405. But 14400 bps is not a speed that is supported by certain operating systems
  406. and so C-Kermit might fail to adjust its speed according to this report.
  407. Therefore, you must lock the modem's interface speed at a higher speed (such
  408. as 19200, 38400, or 57600) that is supported by C-Kermit, set C-Kermit to the
  409. same speed, and tell C-Kermit to SET MODEM SPEED-MATCHING OFF.
  410.  
  411. If you have a high-speed, error-correcting, data-compressing, speed-buffering
  412. modem, you should always SET MODEM SPEED-MATCHING OFF, and you should fix the
  413. modem's interface speed as high as possible, preferably four times higher than
  414. its maximum connection (modulation) speed to allow compression to work at full
  415. advantage.  In this type of setup, you must also have an effective means of
  416. flow control enabled between C-Kermit and the modem, preferably hardware
  417. (RTS/CTS) flow control.
  418.  
  419. C-Kermit knows about a large number of modems, depending on how it was built
  420. (type "set modem type ?" and "show features" for further info).  This
  421. knowledge is imbedded in the SET MODEM and DIAL commands.  If you are having
  422. trouble dialing your modem, SET DIAL DISPLAY ON to watch the dialing
  423. interactions between C-Kermit and your modem.  Consult pages 65-66 of "Using
  424. C-Kermit" for modem-dialing troubleshooting instructions.
  425.  
  426. If it takes your call longer to be completed than the timeout interval that
  427. C-Kermit calculates, you can use the SET DIAL TIMEOUT command to override
  428. C-Kermit's value.  But beware: the modem has its own timeout for completing
  429. the call.  If it is a Hayes-like modem, C-Kermit adjusts the modem's value
  430. too by setting register S7.  But the maximum value for S7 might be smaller
  431. than the time you need!  In that case, C-Kermit sets S7 to 0, 255, or other
  432. (modem-specific) value to signify "no timeout".
  433.  
  434. WARNING: Certain modems might have a maximum dial timeout shorter than what
  435. Kermit expects it to be.  If Kermit attempts to set register S7 to a value
  436. higher than your modem's maximum, the modem will say "ERROR" and you will get
  437. a "Failure to initialize modem" error.  In that case, use SET DIAL TIMEOUT to
  438. override C-Kermit's calculation of the timeout value with the highest value
  439. that is legal for your modem, e.g. 60.
  440.  
  441. The SET MODEM KERMIT-SPOOF command works only for Telebit and US Robotics
  442. modem types; it is OFF by default.  You may wish to experiment with large
  443. packets (1K or greater) and various window sizes with spoofing disabled in the
  444. modem.  In most situations the transfer rates achieved by Kermit with sliding
  445. windows and long packets are better than with protocol spoofing turned on.
  446. Also, attribute (A) packets are not passed by Telebit modems with spoofing
  447. enabled so if they are desired spoofing must be turned off.
  448.  
  449. Some modems have a feature called adaptive dialing.  When they are told to
  450. dial a number using Tone dialing, they check to make sure that dialtone has
  451. gone away after dialing the first digit.  If it has not, the modem assumes the
  452. phone line does not accept Tone dialing and so switches to Pulse.  When
  453. dialing out from a PBX, there is almost always a secondary dialtone.
  454. Typically you take the phone off-hook, get the PBX dialtone, dial "9" to get
  455. an outside line, and then get the phone company's dialtone.  In a situation
  456. like this, you need to tell the modem to expect the secondary dialtone.  On
  457. Hayes and compatible modems, this is done by putting a "W" in the dial string
  458. at the appropriate place.  For example, to dial 9 for an outside line, and
  459. then 7654321, use ATDT9W7654321.  In Kermit 95, this is accomplished with:
  460.  
  461.   SET PBX-OUTSIDE-PREFIX 9W
  462.  
  463. (replace "9" with whatever your PBX's outside-line prefix is).
  464.  
  465. DEC modems...  Reportedly, these don't work right when connected to a DEC
  466. terminal server -- result codes are never reported (on the other hand, this
  467. might be a modem configuration problem).  Dialing "by hand", "blind" still
  468. works.  Also, reportedly "For people who do have DEC modems directly connected
  469. to DEC computers the DF03, DF100-series, and DF200-series modem dialers should
  470. work.  The only thing that is not straightforward is that the DF124-CA,
  471. DF124-CM modems must use the the DF200-series since they speak Digital Modem
  472. Command Language (DMCL) and AT commands.  The Digital Scholar Plus is a DF242
  473. so it uses the DF200-series."
  474.  
  475. If C-Kermit's dialing methods are insufficient for your purposes, you can
  476. write a C-Kermit script program to do the dialing.
  477.  
  478. DIALING AND FLOW CONTROL
  479.  
  480. Most modern modems support RTS/CTS (if they support any hardware flow control
  481. at all), but some computers use different RS-232 circuits for the same
  482. purposes, e.g. DTR and CD, or DTR and CTS.  In such cases, you might be able
  483. to make your computer work with your modem by appropriately cross-wiring the
  484. circuits in the cable connector, for example the computer's DTR to the modem's
  485. RTS, and modem's CD to the computer's CTS.  HOWEVER, C-Kermit does not know
  486. you have done this.  So if you have (say) SET FLOW DTR/CD, C-Kermit will make
  487. no attempt to tell the modem to use RTS/CTS.  You probably did this yourself
  488. when you configured the modem.
  489.  
  490. A "TIES" (Time-Independent Escape Sequence) modem does not require any guard
  491. time around its escape sequence.  The following text:
  492.  
  493. +++ATH0
  494.  
  495. if sent through a TIES modem, for example because you were uploading this
  496. file through it, could pop the modem back into command mode and make it hang
  497. up the connection.  Newer versions of the Telebit T1600 and T3000 (version
  498. LA3.01E firmware and later), and all WorldBlazers, use TIES.
  499.  
  500. Although the probability of "+++" appearing in a Kermit packet is markedly
  501. lower than with most other protocols (see the File Transfer section below), it
  502. can still happen under certain circumstances.  It can also happen when using
  503. C-Kermit's TRANSMIT command.  If you are using a Telebit TIES modem, you can
  504. change the modem's escape sequence to an otherwise little-used control
  505. character such as Ctrl-_ (Control-Underscore):
  506.  
  507.   AT S2=31
  508.  
  509. A sequence of three consecutive Ctrl-_ characters will not appear in a
  510. Kermit packet unless you go to extraordinary lengths to defeat more than a few
  511. of Kermit's built-in safety mechanisms.  And if you do this, then you should
  512. also turn off the modem's escape-sequence recognition altogether:
  513.  
  514.   AT S48=0 S2=255
  515.  
  516. But when escape sequence recognition is turned off, "modem hangup"
  517. (<pause>+++<pause>ATH0<CR>) will not work, so you should also be sure to SET
  518. DIAL MODEM-HANGUP OFF.
  519.  
  520.  
  521. (8) TERMINAL SERVERS
  522.  
  523. How to DIAL from a TCP/IP reverse terminal server (modem server):
  524.  
  525.  1. (only if neccessary) SET TELNET ECHO REMOTE
  526.  2. SET HOST <terminal-server-ip-name-or-address> [ <port> ]
  527.  3. SET MODEM <modem-type>
  528.  4. (only if necessary) SET DIAL HANGUP OFF
  529.  5. DIAL <phone-number>
  530.  
  531. The order is important.
  532.  
  533. Watch out for terminal server's escape character -- usually a control
  534. character such as Ctrl-Circumflex (Ctrl-^).  Don't unprefix it in Kermit !
  535.  
  536. Ciscos -- must often be told to "terminal download"...  Cisco ASM models don't
  537. have hardware flow control in both directions.
  538.  
  539. Many terminal servers only give you a 7-bit connection, so if you can't make
  540. it 8-bit, tell Kermit to "set parity space".
  541.  
  542. The following story, regarding trouble transferring 8-bit files through a
  543. reverse terminal server:
  544.  
  545. A contributed story about Annex terminal servers (begin quote):
  546.  
  547. Using C-Kermit on an HP 9000 712/80 running the HP-UX 10.0 operating system.
  548. The HP was connected to a Xylogics Annex MICRO-ELS-UX R7.1 8 port terminal
  549. server via ethernet.  On the second port of the terminal server is an AT&T
  550. Paradyne 3810 modem, which is connected to a telephone line.  There is a
  551. program which runs on the HP to establish a Telnet connection between a serial
  552. line on the Annex and a character special file on the HP (/dev file).  This is
  553. an Annex specific program called rtelnet (reverse telnet) and is provided with
  554. the terminal server software. The rtelnet utility runs on top of the
  555. pseudo-terminal facility provided by UNIX.  It creates host-originiated
  556. connections to devices attached ot Annex serial ports.  There are several
  557. command line arguments to be specified with this program: the IP address of
  558. the terminal server, the number of the port to attach to, and the name of the
  559. pseudo-device to create.  In addition to these there are options to tell
  560. rtelnet how to operate on the connect: -b requests negotiation for Telnet
  561. binary mode, -d turns on socket-leve debugging, -f enables "connect on the
  562. fly" mode, -r removes the device-name if it already exists, etc.  The most
  563. important of these to be specified when using 8 data bits and no parity, as we
  564. found out, was the -t option.  This creates a transparent TCP connection to
  565. the terminal server.  Again, what we assumed to be happening was that the
  566. rtelnet program encountered a character sequence special to itself and then
  567. "eating" those kermit packets.  I think this is all of the information I can
  568. give you on the configuration, short of the values associated with the port on
  569. the terminal server.  If I can provide any other details, just let me know.
  570. Thanks again for your help.
  571.  
  572. (end quote)
  573.  
  574.  
  575. (9) TERMINAL EMULATION
  576.  
  577. Except for the Windows, OS/2, and Macintosh versions, C-Kermit does not
  578. emulate any kind of terminal.  Rather, it acts more or less as a "transparent
  579. pipe", passing the characters you type during a CONNECT session to the remote
  580. host, and sending the characters received from the remote host to your screen.
  581. Whatever is controlling your keyboard and screen provides the specific
  582. terminal emulation: a real terminal, a PC running a terminal emulator, etc, or
  583. (in the case of a self-contained workstation) your console driver, a terminal
  584. window, xterm, etc.
  585.  
  586. There are several exceptions to the "transparent pipe" rule:
  587.  
  588.  - During a TELNET ("set host") session, C-Kermit itself executes the
  589.    TELNET protocol and performs TELNET negotiations.  (But it does not
  590.    perform TN3270 protocol or any other type of 3270 terminal emulation.)
  591.  
  592.  - If you have changed your keyboard mapping using SET KEY, C-Kermit replaces
  593.    the characters you type with the characters or strings they are mapped to.
  594.  
  595.  - If you SET your TERMINAL CHARACTER-SET to anything but TRANSPARENT,
  596.    C-Kermit translates your keystrokes (after applying any SET KEY
  597.    definitions) before transmitting them, and translates received characters
  598.    before showing them on your screen.
  599.  
  600.  - If your remote and/or local TERMINAL CHARACTER-SET is an ISO 646 7-bit
  601.    national character set, such as German, French, Italian, Swedish, etc, or
  602.    Short KOI used for Cyrillic, C-Kermit's CONNECT command automatically skips
  603.    over ANSI escape sequences to avoid translating their characters.  Only
  604.    ANSI/ISO standard (VT100/200/300-like) 7-bit escape sequence formats are
  605.    supported for this purpose, no proprietary schemes like H-P, Televideo,
  606.    Tektronix, etc.
  607.  
  608.  - If your version of C-Kermit includes SET TERMINAL APC command, then
  609.    C-Kermit's CONNECT command will handle APC escape sequences if TERMINAL
  610.    APC is not set to OFF (which is the default).
  611.  
  612. If you are running C-Kermit under a console driver, or in a terminal window,
  613. that emulates the VT100, and use C-Kermit to log in to a VMS system, the
  614. console driver or terminal window (not Kermit) is supposed to reply to the
  615. "what are you?" query (ESC Z) from the VAX.  If it doesn't, and you can't make
  616. it do so, then you can (a) live with the "unknown terminal" problem; (b) tell
  617. VMS to SET TERMINAL/DEVICE=VT100; (c) program a key using SET KEY to send the
  618. appropriate sequence and then punch the key at the right time; or (d) use the
  619. VMSLOGIN macro that is defined in CKERMIT.INI to do this for you
  620. automatically.
  621.  
  622. SET SESSION-LOG { TEXT, BINARY }, which is effective in UNIX and AOS/VS but
  623. not other C-Kermit versions, removes CR, DEL, NUL, XON, and XOFF characters
  624. ("Using C-Kermit" neglects to mention that XON and XOFF are removed).  The
  625. TEXT-mode setting is ineffective during SCRIPT command execution, as well as
  626. on X.25 connections.
  627.  
  628.  
  629. (10) KEY MAPPING
  630.  
  631. Except in the terminal-emulating versions, C-Kermit's key mapping facilities
  632. are limited to normal "ASCII" keys, and cannot be used with function keys,
  633. arrow keys, arcane key combinations, etc.  Since C-Kermit runs on such a wide
  634. variety of hardware platforms (including, for example, more than 360 different
  635. UNIX platforms), it is not possible for C-Kermit to support every conceivable
  636. keyboard under every release of every UNIX (or VMS, or ...) product on every
  637. different kind of computer possibly under all manner of different console
  638. drivers.
  639.  
  640. In technical terms, C-Kermit uses the read() function to read keystrokes, and
  641. read() returns a single byte (value 0 through 255).  C-Kermit's SET KEY
  642. function applies to these single-byte codes.  "Extended function" keys, such
  643. as F-keys, arrow keys, etc, usually return either a 2-byte "scan code" or else
  644. a character string (such as an escape sequence like "ESC O p").  In both
  645. cases, C-Kermit has no way to tell the difference between such multibyte key
  646. values, and the corresponding series of single-byte key values.  This could
  647. only be done by accessing the keyboard at a much lower level in a highly
  648. system-dependent manner, probably requiring tens of thousands of lines of code
  649. to support even a sampling of the most popular workstation / OS combinations.
  650.  
  651. However, most workstation console drivers (terminal emulation windows, etc)
  652. include their own key-mapping facility.  For example, on an IBM RS/6000, the
  653. AIXterm program (in whose window you would run C-Kermit) allows rebinding of
  654. the F1-F12 keys to arbitrary strings.  The same might or might not be true of
  655. DECterm windows, Sun "vttool" or "crttool" windows, etc.  Consult the
  656. technical documentation for your workstation or emulator.
  657.  
  658. The SET KEY command (except in OS/2) does not allow a key definition to be
  659. (or contain) the NUL (\0) character.
  660.  
  661.  
  662. (11) THE TRANSMIT COMMAND
  663.  
  664. Session logging is inactive during the TRANSMIT command, even if you have
  665. given a LOG SESSION command.
  666.  
  667.  
  668. (12) FILE TRANSFER
  669.  
  670. If you have a multihop connection, with the interior nodes in CONNECT
  671. mode (Kermit, Telnet, Rlogin, or any other), you can expect (a) file transfer
  672. to be slower, and (b) the connection to be less transparent (to control
  673. characters, perhaps to the 8th bit) than a more direct connection.
  674.  
  675. The recovery feature (RESEND command) that was added in edit 190 works only
  676. for binary-mode transfers.  In order for this feature to be useful at all, the
  677. default for SET FILE INCOMPLETE was changed from DISCARD to KEEP.  Otherwise
  678. an interrupted transfer would leave no partial file behind unless you had
  679. remembered to change the default.  But now you have to pay closer attention to
  680. Kermit's messages to know whether a transfer succeeded or failed --
  681. previously, if it failed, the file would not show up on the receiving end at
  682. all; in edit 190 and later, you'll get a partial file which could easily be
  683. mistaken for the complete file unless you change the default back to DISCARD
  684. or read the screen messages, or keep a transaction log.
  685.  
  686. Watch out for SET FILE COLLISION RENAME, especially when used in conjunction
  687. with recovery.  Recall that this option (which is NOT the default) renames
  688. the incoming file if a file already exists with the same name (the default is
  689. to rename the previously existing file, and store the incoming file with its
  690. own name).  It is strongly recommended that you do not use SET FILE COLLISION
  691. RENAME if you ever intend to use the recovery feature:
  692.  
  693.  . When the file is first received by C-Kermit, its name will be changed if
  694.    another file already has the same name.  When you RESEND the same file
  695.    after a failure, C-Kermit will probably try to append the re-sent portion
  696.    to the wrong file.
  697.  
  698.  . Assuming that you get RESEND to work with FILE COLLISION RENAME, C-Kermit,
  699.    when receiving the remainder of the file during a RESEND operation, will
  700.    report back the wrong name.  Nothing can be done about this because the
  701.    name is reported back before the receiving Kermit program finds out that
  702.    it is a recovery operation.   
  703.  
  704. Automatic directory creation for received files does not work for pathnames
  705. given in the "-a" command-line argument.
  706.  
  707. There are no command-line arguments for "set file names { literal, converted }"
  708. or "set { send, receive } pathnames { on, off }", but you can include these
  709. (or any other) commands on the command line in the -C option string.
  710.  
  711. When referring to MS-DOS, Atari ST, OS/2, or other file specifications that
  712. contain backslash characters in a C-Kermit command, you might have to double
  713. each backslash, for example:
  714.  
  715.   C-Kermit>get c:\\directory\\foo.txt
  716.  
  717. This is because backslash is used in C-Kermit commands for introducing special
  718. character codes, variables, functions, etc.  If you are sending this GET
  719. command to another copy of C-Kermit running as a server, for example on OS/2
  720. or the Atari ST, it too treats backslashes as prefix characters, so you will
  721. need 4 (yes, 4) copies of each backslash:
  722.  
  723.   C-Kermit>get c:\\\\directory\\\\foo.txt
  724.  
  725. But read about the new command, SET COMMAND QUOTING OFF, in the manual.
  726.  
  727. ANOTHER NOTE: In Kermit 95 and OS/2 C-Kermit, this restriction is lifted as
  728. far as referring to files on the local PC.  You can now refer to these files
  729. using natural PC notation, e.g.
  730.  
  731.   C-Kermit>send c:\letters\oofa.txt
  732.  
  733. Attempting to cancel local-mode file reception at a very early stage (i.e.
  734. before data packets are exchanged) with X or Z does not work.  Workarounds:
  735. Use E or Ctrl-C instead, or wait until the first data packets are sent.
  736.  
  737. If you cancel a transfer that is underway using X or Z, and a lot of window
  738. slots are in use, it might take a long time for the cancellation to take
  739. effect, especially if you do this on the receiving end; that's because a lot
  740. of packets might already be on their way to you.  In that case, just be
  741. patient and let Kermit "drain" them.
  742.  
  743. If C-Kermit is sending a file, remote-mode packet-mode breakout (Ctrl-C Ctrl-C
  744. by default) is not effective until after C-Kermit sends its first packet.  If
  745. C-Kermit is receiving a file or is in server mode, it will be effective right
  746. away.  In the former case, the SET DELAY value determines the earliest time at
  747. which you can break out of packet mode.
  748.  
  749. Some communication programs have errors in their implementation of Kermit
  750. attribute packets.  If you get an error message from your communication
  751. program like "Attribute error", tell C-Kermit to SET ATTRIBUTES OFF.  Better
  752. yet, switch to a real Kermit program, such as MS-DOS Kermit.
  753.  
  754. When using C-Kermit to transfer files with the HP48SX calculator, you must
  755. SET FLOW NONE.  The HP48SX does not support flow control, and evidently also
  756. becomes confused if you attempt to use it.
  757.  
  758. Occasionally, when receiving files in remote mode using a large window
  759. size, attempts to cancel a file (X) can take a long time.
  760.  
  761. The fullscreen file transfer display will not work right if your terminal type
  762. is set incorrectly, or is not known to the host operating system.  Even when
  763. it does work, it might slow down your file transfers a bit, especially on
  764. high-speed network connections.  On certain small computers, it has been
  765. reported to cause increased disk activity due to swapping or paging.  The
  766. fullscreen display is not particularly useful with speaking or Braille devices.
  767. In these cases, use SET FILE DISPLAY CRT or SET FILE DISPLAY SERIAL.
  768.  
  769. If you have trouble transferring files over a TCP/IP connection, give the
  770. command:
  771.  
  772.   SET PARITY SPACE
  773.  
  774. and try again.  If that doesn't work, also try a shorter packet length.
  775.  
  776. On the other hand, if file transfers through a TCP/IP connection work, but are
  777. very slow, use a longer packet length, 2000 or more, and also try increasing
  778. the window size.  Also, make sure FLOW is NONE since TCP/IP handles flow
  779. control itself, and XON/XOFF processing only slows things down.
  780.  
  781. Some communication software claims to implement sliding windows, but does so
  782. incorrectly.  If sliding window transfers fail, set C-Kermit's window size to
  783. the smallest one that works, for example:
  784.  
  785.   SET WINDOW 1
  786.  
  787. The UNIX version of C-Kermit discards carriage returns when receiving files
  788. in text mode.  Thus, "bare" carriage returns (sometimes used to achieve
  789. overstriking) are lost.
  790.  
  791. SET FILE COLLISION BACKUP is the default.  This means:
  792.  
  793.  - If you send the same file lots of times, there will be many backup files.
  794.    There is no automatic mechanism within Kermit to delete them, no notion of
  795.    a "version retention count", etc.
  796.  
  797.  - If a file arrives that has the same name as a directory, the file transfer
  798.    fails.  Send the file with another name, or use SET FILE COLLISION RENAME.
  799.  
  800. SET FILE COLLISION UPDATE depends on the date/time stamp in the attribute
  801. packet.  However, this is recorded in local time, not GMT, and there is no
  802. indication of time zone.  The time is expressed to the precision of 1 second,
  803. but some file systems do not record with this precision -- for example, MS-DOS
  804. records the file date/time only to the nearest 2 seconds.  This might cause
  805. update operations to send more files than necessary.
  806.  
  807. SET FILE COLLISION OVERWRITE is risky, use it with caution.  Under certain
  808. conditions, the existing file can be deleted even if the incoming file is
  809. refused.
  810.  
  811. When C-Kermit is receiving files from another Kermit program that has been
  812. given the MAIL or REMOTE PRINT command, C-Kermit follows the current filename
  813. collision action.  This can be disconcerting if the action was (for example)
  814. BACKUP, because the existing file will be renamed, and the new file will be
  815. mailed (or printed) and then deleted.  Kermit cannot temporarily change to
  816. RENAME because the file collision action occurs when the filename packet is
  817. received, and the PRINT or MAIL disposition only comes later, in the Attribute
  818. packet.
  819.  
  820. The STATISTICS command will produce an incorrect efficiency report if (a) it
  821. does not know the true communication speed (e.g. on a network connection), or
  822. (b) it knows the true serial interface speed to a modem, but the modem is
  823. using a different communication speed with the other modem.  Similarly, in
  824. these circumstances, C-Kermit's automatic calculation of the packet timeout
  825. interval might also be incorrect, which can cause file transfers to fail.  One
  826. solution to the latter problem is to SET SEND and RECEIVE TIMEOUT to
  827. appropriate values for your true communication speed and packet length.
  828.  
  829. TELNET option negotiations are not handled during file transfer.  So far, no
  830. ill effects have been noted.
  831.  
  832. Why is Kermit file transfer over a TCP/IP connection slower than FTP?  Because
  833. the Kermit program on the remote end of the connection is not running directly
  834. on a TCP socket, but rather running underneath a TELNET server, usually on a
  835. pseudoterminal and under a login shell, with the vast amounts of per-character
  836. overhead all of that implies.  Future Kermit releases will be able to act
  837. directly as TCP servers, eliminating all this overhead.
  838.  
  839. Execution of multiple file transfers by C-Kermit from a command file when
  840. in remote mode might exhibit long delays between each transfer.  To avoid
  841. this, just include the command "SET DELAY 0" in your command file before any
  842. of the file-transfer commands.
  843.  
  844.  
  845. (13) SCRIPT PROGRAMMING
  846.  
  847. The CKERMIT.INI file that was originally distributed with C-Kermit 5A(188)
  848. and (189) contained a nonfunctional CISLOGIN (CompuServe Login) macro.
  849. Fixed in CKERMIT.INI dated September 2, 1993, or later.
  850.  
  851. Remember that ";" and "#" introduce comments when (a) they are the first
  852. character on the line, or (b) they are preceded by at least one blank or
  853. tab.  Thus constructions like:
  854.  
  855.   INPUT 5 ;
  856.   SCRIPT ~0 #--#--# 
  857.  
  858. must be coded using backslash notation to keep the data from being ignored:
  859.  
  860.   INPUT 5 \59            ; 59 is the decimal ASCII code for ";"
  861.   SCRIPT ~0 \43--#--#        ; 43 is the decimal ASCII code for "#"
  862.  
  863. or, more simply:
  864.  
  865.   INPUT 5 \;                    ; Just quote the semicolon
  866.   SCRIPT ~0 \#--#--#            ; Just quote the "#"
  867.  
  868. INPUT and REINPUT caseless string comparisons do not work for non-ASCII
  869. (international) characters.  Workaround: SET INPUT CASE OBSERVE.  Even then,
  870. the "lexically less than" and "lexically greater than" operations (IF LLT, IF
  871. LGT) probably won't work as expected.  The same is true for the
  872. case-conversion functions \Flower() and \Fupper().  C-Kermit does not know the
  873. collating sequence for different character sets and languages.  (On the other
  874. hand, it might work depending on such items as how Kermit was linked, whether
  875. your operating supports "locales", etc)
  876.  
  877. You can't include a NUL character (\0) in C-Kermit command text without
  878. terminating the character string in which it appears.  For example:
  879.  
  880.   echo In these brackets [\0] is a NUL
  881.  
  882. will echo "In these brackets [".  This applies to ECHO, INPUT, OUTPUT, and all
  883. other commands (but you can represent NUL by "\N" in an OUTPUT string).  This
  884. is because C-language strings are terminated internally by the NUL character,
  885. and it allows all of C-Kermit's string comparison and manipulation functions
  886. to work in the normal "C" way.
  887.  
  888. To illustrate:
  889.   INPUT 5 \0
  890. is equivalent to:
  891.   INPUT 5
  892. and:
  893.   INPUT 5 ABC\0DEF
  894. is equivalent to:
  895.   INPUT 5 ABC
  896.  
  897. INPUT operations discard and ignore NUL characters that arrive from the
  898. communication device, meaning that they do not figure into matching operations
  899. (e.g. A<NUL>B matches AB); they are not deposited in the INPUT buffer
  900. (\v(input)); and they are not counted in \v(incount), with two exceptions:
  901.  
  902.   1. An arriving NUL character restarts the INPUT SILENCE timer.
  903.  
  904.   2. An arriving NUL character terminates the INPUT command with the
  905.      SUCCESS condition if the INPUT command was given an empty search
  906.      string.  In this case \v(incount) is set to 1.
  907.  
  908. Also, the \v(inchar) variable is null (completely empty) if the last INPUT
  909. character was NUL.  That is, there is no way to tell only by looking at
  910. \v(inchar) the difference between a NUL that was INPUT and no INPUT at all.
  911. If the INPUT command succeeded but \v(inchar) is empty, then a NUL character
  912. was input.  Also, \v(incount) will be set to 1.
  913.  
  914. \v(incount) and \v(inchar) are NOT affected by the CLEAR command.
  915.  
  916. GOTO can be used sort of like switch/case.  For example, if you know that the
  917. value of \%a is 1, 2, or 3, you can "goto \%a" provided you have labels :1,
  918. :2, and :3.  What it missing, however, is an automatic way to trap failing
  919. GOTOs, similar to the "default:" clause of a C switch() statement.
  920.  
  921. The following script program:
  922.  
  923.   set count \ffiles(oofa.*)
  924.   :loop
  925.   send \fnextfile()
  926.   if count goto loop
  927.  
  928. does not work as expected.  The SEND command (and any other command that
  929. parses a filename, including TAKE) implicitly calls the same internal function
  930. that \ffiles() calls, and thus destroys the file list set up in the first
  931. line.  To accomplish this type of operation: (1) give the wild filespec to
  932. \ffiles(); (2) loop through the file list and assign each filename to an array
  933. element; (3) use the array of filenames in subsequent file-related commands.
  934. Example:
  935.  
  936.   asg \%n \ffiles(\%1)
  937.   declare \&f[\%n]
  938.   for \%i 1 \%n 1 { asg \&f[\%i] \fnextfile() }
  939.   for \%i 1 \%n 1 {
  940.       send \&f[\%i]
  941.   }
  942.  
  943. Certain settings are local to each command level, meaning that subordinate
  944. command levels (macros or command files) can change them without affecting
  945. their values at higher command levels.  When a new command level is invoked,
  946. the value is inherited from the previous level.  These settings are:
  947.  
  948.   CASE
  949.   COUNT and \v(count)
  950.   INPUT CASE
  951.   INPUT TIMEOUT
  952.   MACRO ERROR
  953.   TAKE ERROR
  954.  
  955. This arrangement allows CASE, TIMEOUT, and ERROR settings, which are used to
  956. control automatic exit from a command file or macro upon error, to be
  957. automatically restored when the command file or macro exits.
  958.  
  959. The COUNT variable follows this rule too, which permits nested SET COUNT /
  960. IF COUNT loops, as in this example in which the inner loop counts down from
  961. the current COUNT value of the outer loop (try it):
  962.  
  963.   DEFINE INNER WHILE COUNT { WRITE SCREEN {   Inner:}, SHOW COUNT }
  964.   SET COUNT 5
  965.   WHILE COUNT { WRITE SCREEN Outer:, SHOW COUNT, DO INNER }
  966.  
  967. Keep in mind that an inferior command level cannot manipulate the COUNT
  968. value held by a higher level.  For example:
  969.  
  970.   DEFINE OOFA SHOW COUNT, IF COUNT GOTO LOOP
  971.   SET COUNT 5
  972.   :LOOP
  973.   OOFA
  974.   ECHO Done
  975.  
  976. results in an infinite loop; the COUNT value remains at 5 because it is never
  977. decremented at the same level at which it was set.
  978.  
  979. NOTE: "WHILE COUNT" did not work prior to edit 095 of ckuusr.c, 19 Jan 93.
  980.  
  981. (End of CKERMIT.BWR)
  982.