home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / archives / msr313src.zip / msiibm.tut < prev    next >
Text File  |  1990-06-19  |  31KB  |  729 lines

  1. Kermit Script Files: (PART 1 of 4)
  2.  
  3. This is a tutorial on MS-DOS Kermit scripts.  A script is a file containing
  4. Kermit commands to be executed.  This script feature applies to MS-DOS
  5. Kermit version 2.30 and above.  Versions prior to this release may or may
  6. not have all of the functions described in this series of messages.  MS-DOS
  7. Kermit, version 2.30, may be copied from the terminal room located at 251
  8. Mudd or may be purchased from the User Services Business Office at 321 SIA.
  9.  
  10. Scripts may contain any Kermit command, just as a TAKE file in Kermit
  11. terminology, but may also include other special commands such as INPUT,
  12. OUTPUT, PAUSE, ECHO, and CLEAR to automatically detect and respond to
  13. information flowing though the serial port.  These actions would otherwise
  14. be performed by the user during CONNECT.  The login sequence of a host
  15. computer is a classic example.
  16.  
  17.  INPUT:  tells Kermit to look for certain characters from the other computer.
  18.  OUTPUT: tells Kermit to send the given characters to the other computer.
  19.  ECHO:   displays the given string on your screen.
  20.  PAUSE:  tells Kermit to wait a specified number of seconds before continuing.
  21.  CLEAR:  empties the buffers of the serial port to forget earlier material.
  22.  
  23. For complete details about scripts, see "Using MS-DOS Kermit" by Christine
  24. M. Gianone, Digital Press (1990).
  25.  
  26. Below are some examples of common script uses.  There are some general
  27. settings which you will probably want to use all the time so these commands
  28. have been placed in the file called GENERAL.SCR below.
  29.  
  30. ==============================CUT HERE==============================
  31.  
  32. ; GENERAL.SCR
  33. ;
  34. COMMENT Kermit script with general settings.
  35. ;
  36. ; MS-Kermit 2.30 Script File for the IBM PC, XT, AT, PS2, etc.
  37. ;
  38. ; Add this section onto the top of any of your login script files --
  39. ; PACX.SCR, ROLM.SCR or DIAL.SCR.
  40. ; If no timeout period is given, the default is 1 second
  41. ;
  42. set terminal VT102        ; Set terminal type
  43. set input echo on         ; Echo responses
  44. set input timeout quit    ; Stop if no response after the provided time period
  45. set speed 9600            ; Can change to 4800, etc.
  46. set parity none           ; Do not use any parity
  47. set handshake none        ; Do not use any hanshaking characters
  48. set flow xon              ; Use XON/XOFF flow control 
  49. set local off             ; Do not use local echo
  50. ;
  51. ; ADD DIAL.SCR HERE IF DIALING UP.
  52. ; THEN ADD PACX.SCR or ROLM.SCR.
  53. ;
  54. COMMENT - End Kermit General Settings Script
  55.  
  56. ==============================CUT HERE==============================
  57.  
  58. There are three common ways to connect to any computer:
  59.  
  60. 1. Using the LDS-125 PACX boxes we currently have on campus at Columbia
  61.    University or the ROLM data phones which will soon replace them.
  62.  
  63. 2. Using a modem to dial from one computer to another.
  64.    (* Note: A user must still go through the PACX or ROLM switch even 
  65.             when dialing up in order to connect to CUCCA's host systems).
  66.  
  67. 3. Using a direct line (cable) which runs from one computer to another.
  68.    (* Note : A script file here would only need to set the speed or baud rate)
  69.  
  70.  
  71. Always use:                      GENERAL.SCR
  72.                                       |
  73.                                       |
  74. Use only if dialing:               DIAL.SCR         Omit this if connected
  75.                                   /   |    \        directly to the PACX.
  76.                                  /    |     \
  77. Use if going thru a             /     |      \
  78. switch (e.g. when           PACX.SCR  |  ROLM.SCR   Omit this step for 
  79. connecting to the               \     |      /      hardwired host connections
  80. CUCCA host systems).             \    |     /       or direct host dialup.
  81.                                   \   |    /
  82. Script for logging in             CUNIX.SCR         Or CU20B.SCR, CUVMA.SCR,
  83. to a particular system.                             CLIO.SCR, etc.
  84.  
  85.  
  86. Suppose you usually use the LDS-125 PACX box to connect to one of the many
  87. computers on campus.  Instead of always typing the same commands
  88. interactively, you may want to use the following script called PACX.SCR:
  89.  
  90. ==============================CUT HERE==============================
  91.  
  92. ; PACX.SCR
  93. ;
  94. COMMENT Kermit script for connecting to CU systems thru PACX
  95. ;
  96. ; MS-Kermit 2.30 Script File for the IBM PC, XT, AT, PS2, etc.
  97. ;
  98. ; For use with the CUCCA mainframe systems connected via PACX lines.
  99. ; Add this section to the beginning of any of your login script files 
  100. ; (CUNIXC.SCR, etc.) AFTER your general script settings file (GENERAL.SCR).
  101. ;
  102. echo Make sure your PACX box is turned on and ready\13
  103. echo Type carriage return when ready...
  104. output @con
  105. pause 2              ; Wait 2 secs
  106. output \13                ; Give a CR (carriage return) (\13 = ASCII CR)
  107. input 10 =>               ; Expect to see PACX prompt " => " within 10 seconds
  108. pause 1                   ; Wait 1 second
  109. ;
  110. ; ADD CU20.SCR, CUVM.SCR, SIM.SCR, CLIO.SCR, or CUNIXC.SCR HERE.
  111. ;
  112. COMMENT - End Kermit PACX Settings Script
  113.  
  114. ==============================CUT HERE==============================
  115.  
  116. Then you could add a script which actually connected you to a specific
  117. computer.  For example, suppose we usually connected to CUNIXC through a PACX
  118. box.  Then we could run the GENERAL.SCR, followed by the PACX.SCR, followed
  119. by the CUNIXC.SCR below:
  120.  
  121. ==============================CUT HERE==============================
  122.  
  123. ; CUNIXC.SCR
  124. ;
  125. COMMENT Kermit script for connecting to CU CUNIXC system.
  126. ;
  127. ; MS-Kermit 2.30 Script File for the IBM PC, XT, AT, PS2, etc.
  128. ;
  129. ; For use with the CUCCA's CUNIXC system.
  130. ; Add to the bottom of either PACX.SCR or ROLM.SCR.
  131. ;
  132. output cunixc\13            ; Type cunixc and a carrige return (ASCII 13)
  133. ;output cunixa\13           ; Change to cunixa or any other UNIX system
  134. pause 1                     ; Wait 1 second
  135. input 10 login:             ; Expect to see CUNIXC's login prompt
  136. output USERNAME\13          ; Type username (replace with yours) & CR
  137. set input echo off          ; Privacy, please
  138. input word:                 ; Expect to see password: (abbrev.)
  139. echo \13Type your password: ; Make our own prompt.
  140. output @con                 ; Type in password at your console
  141. output \13                  ; Add a real carriage return
  142. set input echo on        ; Back to normal viewing
  143. connect                     ; Connect to system
  144. ;
  145. COMMENT - End of CUNIXC Script
  146.  
  147. ==============================CUT HERE==============================
  148.  
  149. Notice the @con command in the script example above.  It is here that you
  150. type your password to the console.  You could replace the @con with your
  151. actual password in the script but this is not a good idea for security
  152. reasons.  Anyone who ran your script would be able to login to your computer
  153. account, or at least look at your script file to see your password.
  154.  
  155. How do you actually run these scripts?  You insert the MS-DOS Kermit 2.30
  156. diskette in your floppy disk drive (or put the KERMIT.EXE file on your hard
  157. disk) and type KERMIT.  The script files must be on this disk as well.  At 
  158. the KERMIT-MS> prompt, you type TAKE <script filename>.
  159.  
  160. Example:
  161.  
  162.    A> KERMIT
  163.  
  164.    MS-KERMIT> TAKE GENERAL.SCR
  165.  
  166.    MS-KERMIT> TAKE PACX.SCR
  167.  
  168.    MS-KERMIT> TAKE CUNIXC.SCR
  169.  
  170. Yes, you can put ALL the commands in the three script files above into one
  171. single file and say TAKE <filename> only one time.  The reason the single
  172. file has been broken into three parts is because most users do not ALWAYS
  173. want to use a PACX box.  Sometimes a modem or a direct line is used instead.
  174. And users may even use other computers besides CUNIXC, such as CUVM, VMS,
  175. CLIO or even the DEC-20.  With the separate files above, it is easy to
  176. substitute PACX.SCR with something called ROLM.SCR and CUNIXC.SCR with
  177. CUVM.SCR, as we will see in the next message of this script tutorial series.
  178.  
  179. ------------------------------
  180.  
  181. Kermit Script Files: (PART 2 of 4)
  182.  
  183. This is the second part of the short tutorial on MS-DOS Kermit scripts.
  184. The last message gave an example of a general script, which users will
  185. probably always want to add to the beginning of their script files.
  186.  
  187. Following was an example of a script to connect a computer through the
  188. LDS-125 Gandalf PACX box.  Users may sometimes use this method, but may also
  189. want to connect to another computer using a modem.  The script below will
  190. automatically do what a user would do interactively when connecting to
  191. another computer using a Hayes or Hayes compatible modem.  You could write a
  192. similar script for use with a modem that used a different dialing language.
  193.  
  194. * Note - CUCCA systems currently require that users go through the PACX box
  195.          even after a dial-up connection is established.
  196.          (You may, however, be able to dial directly into a departmental
  197.          computer without going through the PACX box.)
  198.  
  199. ==============================CUT HERE==============================
  200.  
  201. ; DIAL.SCR
  202. ;
  203. COMMENT Kermit script for dialing through a Hayes or compatible modem.
  204. ;
  205. ; MS-Kermit 2.30 Script File for the IBM PC, XT, AT, PS2, etc.
  206. ;
  207. ; For use with the Hayes or compatible modem.
  208. ; Add this section onto any of your login script files (CUNIXC.SCR, etc.)
  209. ; AFTER your general script settings file (GENERAL.SCR).
  210. ;
  211. clear                     ; Flush serial port buffers.
  212. set speed 1200            ; (or 2400 if you have a 2400 bps modem)
  213. output AT\13              ; Wakeup modem (AT, carriage return)
  214. input OK                  ; It should say "OK".
  215. pause                     ; Now pause a second.
  216. output ATDT 2808050\13    ; Dial the phone (PACX number).
  217. input 30 CONNECT          ; Wait for connect message.
  218. pause 2                   ; Allow time for PACX to wake up.
  219. ;
  220. ; FOR CUCCA SYSTEMS YOU NEED TO ADD PACX.SCR HERE TO CONNECT.
  221. ; ADD CU20.SCR, CUVM.SCR, SIM.SCR, CLIO.SCR or CUNIXC.SCR AFTER THAT.
  222. ;
  223. COMMENT - End of Hayes or compatible Modem Script
  224.  
  225. ==============================CUT HERE==============================
  226.  
  227. Other users may also have direct cable connections from an IBM PC to another
  228. computer.  In that case you need only set the speed or baud rate before
  229. connection establishment.  This is already done in GENERAL.SCR.
  230.  
  231. Eventually, the PACX will be replaced by the new ROLM CBX and you will want
  232. to have a script to connect this way also.  The Rolm dialog is similar to
  233. the PACX dialog, except the PACX prompts you with "Enter node name =>" and
  234. you type the name of the computer, whereas the Rolm prompts you with "CALL,
  235. DISPLAY OR MODIFY?" and you type "CALL" followed by the name of the
  236. computer.  You can replace your PACX.SCR with the ROLM.SCR file below.
  237.  
  238. ==============================CUT HERE==============================
  239.  
  240. ; ROLM.SCR
  241. ;
  242. COMMENT Kermit script for connecting to CU systems thru the ROLM switch.
  243. ;
  244. ; MS-Kermit 2.30 Script File for the IBM PC, XT, AT, PS2, etc.
  245. ;
  246. ; For use with the CUCCA mainframe systems connected via ROLM lines.
  247. ; Add this section to the beginning of any of your login script files 
  248. ; (CUNIXC.SCR, etc.) AFTER your DIAL.SCR file, if any, or else
  249. ; AFTER your general script settings file (GENERAL.SCR).
  250. ;
  251. output \13        ; Send a carriage return
  252. input 10 MODIFY?        ; Wait up to 10 seconds for Rolm prompt
  253. pause 1                 ; Wait one second before replying
  254. output CALL\32          ; Type CALL and an a space (ASCII 32)
  255. ;
  256. ; The host system login script will output the desired system to login to.
  257. ;
  258. ; To connect to a system, output CALL xxx\13, where xxx is the system name.
  259. ; and then wait for CALL COMPLETE message.
  260. ;
  261. ; ADD CU20.SCR, CUVM.SCR, SIM.SCR, CLIO.SCR, or CUNIXC.SCR HERE.
  262. ;
  263. COMMENT - End Kermit ROLM Settings Script
  264.  
  265. ==============================CUT HERE==============================
  266.  
  267. Suppose you usually connect to CUNIXC but sometimes you use the PACX 
  268. (which will become the ROLM switch), sometimes you dial from home using a
  269. modem, and other times you have access to a direct line to this computer.
  270. How can you use scripts to connect to CUNIXC in various ways?  You simply
  271. store all these script files on your disk and tell Kermit which file(s) you
  272. would like to use.
  273.  
  274. * Note: In the following examples you could replace PACX.SCR with ROLM.SCR.
  275.  
  276. Example:
  277.  
  278.    A> KERMIT
  279.  
  280.    MS-KERMIT> TAKE GENERAL.SCR       (do general script)
  281.  
  282.    MS-KERMIT> TAKE DIAL.SCR          (only if dialing-up)
  283.  
  284.    MS-KERMIT> TAKE PACX.SCR          (you need this when
  285.                                       dialing up through
  286.                                       the PACX)
  287.  
  288.    MS-KERMIT> TAKE CUNIXC.SCR        (do cunixc script)
  289.  
  290. You may have access to many different computers at Columbia.  In the next
  291. script message we will see how to write scripts to connect to these various 
  292. machines.
  293.  
  294. ------------------------------
  295.  
  296. Kermit Script Files: (PART 3 of 4)
  297.  
  298. This is the third part of the MS-DOS Kermit script tutorial.  So far we have
  299. seen examples of scripts which will give us the general settings, scripts
  300. which will connect our IBM PC to another computer if we are using an LDS-125
  301. Gandalf PACX box, the ROLM switch, a Hayes or Hayes-compatible modem or a
  302. direct line, and a script which allows us to login to CUNIXC with minimum
  303. user interaction.
  304.  
  305. Now we will see examples of scripts for the various types of host computers
  306. we have here at Columbia.  Just as we saw how to substitute our PACX.SCR
  307. with our ROLM.SCR, we will see that we can also replace our CUNIXC.SCR with
  308. any of the following scripts.
  309.  
  310. Below is an example of a script which will login to the DEC-20 Mainframe:
  311.  
  312. ==============================CUT HERE==============================
  313.  
  314. ; CU20.SCR
  315. ;
  316. COMMENT Kermit script for connecting to CU DEC-20 system.
  317. ;
  318. ; MS-Kermit 2.30 Script File for the IBM PC, XT, AT, PS2, etc.
  319. ;
  320. ; For use with the CUCCA DEC-20 mainframe systems.
  321. ; Add to the bottom of either PACX.SCR.
  322. ;
  323. output cu20b\13             ; Tell the switch which system 
  324. input 10 \64                ; Expect to see @ (DEC-20 prompt - ASCII 64 = @)
  325. output login USERNAME\13    ; Type login username (replace with yours) & CR
  326. set input echo off          ; Privacy, please
  327. input word:                 ; Expect to see "password:" (abbrev.)
  328. echo \13Type your password: ; Make our own prompt
  329. output @con                 ; Type in password at the console
  330. set input echo on        ; Back to normal viewing
  331. output \13                  ; Add a real carriage return
  332. connect                     ; Connect to system
  333. ;
  334. COMMENT - End of DEC-20 Script
  335.  
  336. ==============================CUT HERE==============================
  337.  
  338. And here is a script which allows you to login to the IBM VM/CMS Mainframe
  339. in linemode:
  340.  
  341. ==============================CUT HERE==============================
  342.  
  343. ; CUVM.SCR
  344. ;
  345. COMMENT Kermit script for connecting to CU IBM system through the COMTEN.
  346. ;
  347. ; MS-Kermit 2.30 Script File for the IBM PC, XT, AT, PS2, etc.
  348. ;
  349. ; For use with the CUCCA IBM VM/CMS mainframe systems.
  350. ; Add to the bottom of either PACX.SCR or ROLM.SCR.
  351. ;
  352. set parity mark             ; IBM Mainframes use parity
  353. set handshake xon           ; Set the hanshaking character
  354. set flow none               ; Do not need flow control
  355. set local on                ; Echo locally on the screen
  356. output cuvm\13              ; Tell the switch which system
  357. pause 1                 ; Wait for COMTEN to crank itself up
  358. output \13                  ; Send another CR for speed recognition
  359. set input default 10        ; Set default timeout interval
  360. input ACTERS:               ; Look for end of "valid switch chars" message
  361. pause 1                        ; Wait a sec to let COMTEN get ready for input
  362. output vma\13               ; Tell it which system 
  363. ; output vmb\13             ; Can change system to vmb or vmc
  364. pause 1                ; Wait another sec for VM to wake up
  365. input BREAK KEY             ; VM/SP5's new greeting...
  366. output \b                   ; Send a BREAK, like it asks
  367. input .\17                  ; Now wait for CMS's "." prompt
  368. out logon USERNAME\13       ; Type username (replace with yours) & CR
  369. pause 1                     ; Wait a sec
  370. set input echo off          ; Privacy, please
  371. input word:                 ; Expect to see password: (abbrev.)
  372. echo \13Type your password: ; Make our own prompt.
  373. out @con                    ; Console keystokes
  374. set input echo on           ; Normal viewing again
  375. input 30 .\17               ; Login messages type out, wait for prompt.
  376. output \13                  ; Send another CR
  377. input .\17                  ; Wait for CMS's "." prompt, followed by Ctrl-Q
  378. output \13                  ; Send another CR
  379. connect                     ; Connect to system
  380. ;
  381. COMMENT - End of CUVM Line-Mode Script
  382.  
  383. ==============================CUT HERE==============================
  384.  
  385. But you may sometimes use the 3270 simulator to access the IBM VM/CMS
  386. mainframe in full-screen mode.  Below is an example of a script:
  387.  
  388. ==============================CUT HERE==============================
  389.  
  390. ; SIM.SCR
  391. ;
  392. COMMENT Kermit script for connecting to CU IBM Mainframe.
  393. ;
  394. ; MS-Kermit 2.30 Script File for the IBM PC, XT, AT, PS2, etc.
  395. ;
  396. ; For logging in to the Columbia IBM mainframes in fullscreen mode 
  397. ; through the 7171 protocol emulator.
  398. ; Add to the bottom of either PACX.SCR or ROLM.SCR.
  399. ;
  400. set parity even             ; Set parity to match the remote system
  401. output sima\13              ; Tell it which system 
  402. ; output simb\13            ; Can change this to simb too
  403. input 5 NAL TYPE:\32        ; Wait to be asked what terminal you are using
  404. output VT-100\13            ; Tell it you are a VT-100 & CR
  405. input 20 COMMAND  ===>        ; Look for this
  406. output USERNAME\13          ; Send user ID (replace with your ID) & CR
  407. connect                     ; Connect to system, type password there.
  408. ;
  409. COMMENT - End of CUVM Full-Screen Script
  410.  
  411. ==============================CUT HERE==============================
  412.  
  413. Or you may want to access CLIO, the library database.  Below is a script
  414. written for this purpose.  Note that sometimes when you login to CLIO you
  415. may enter the middle of a session.  If this happens, the Kermit script will
  416. obviously not work.  You can run the script again and hope that you enter a
  417. new session the second time.
  418.  
  419. ==============================CUT HERE==============================
  420.  
  421. ; CLIO.SCR
  422. ;
  423. COMMENT Kermit script for connecting to CLIO.
  424. ;
  425. ; MS-Kermit 2.30 Script File for the IBM PC, XT, AT, PS2, etc.
  426. ;
  427. ; For logging in to the Columbia CLIO system in fullscreen mode
  428. ; through the 7171 protocol emulator.
  429. ; Add to the bottom of either PACX.SCR or ROLM.SCR.
  430. ;
  431. set parity even             ; Set parity to match the remote system
  432. output clio\13              ; Tell it which system 
  433. input 5 NAL TYPE:\32        ; Wait to be asked what terminal you are using
  434. output VT-100\13            ; Tell it you are a VT-100 & CR
  435. output \13                  ; Send a carriage return
  436. pause 3                     ; Wait 3 seconds
  437. output CLIO\9            ; Login as CLIO, tab to password field
  438. pause 1                     ; Wait 1 second
  439. output CLIO\13              ; Password CLIO
  440. connect
  441. ;
  442. COMMENT - End of CLIO Full-Screen Script
  443.  
  444. ==============================CUT HERE==============================
  445.  
  446. And still other users may have access to a VAX/VMS system.  Below is an
  447. example of a script for logging in to such a computer.  There is currently
  448. no access to any CUCCA VAX/VMS systems through the PACX.
  449.  
  450. ==============================CUT HERE==============================
  451.  
  452. ; VMS.SCR
  453. ;
  454. COMMENT Kermit script for connecting to CU VAX/VMS system.
  455. ;
  456. ; MS-Kermit 2.30 Script File for the IBM PC, XT, AT, PS2, etc.
  457. ;
  458. ; For use with the CUCCA's VAX/VMS system using a direct line.
  459. ; VAX/VMS is not currently an option to choose on the PACX.
  460. ; Add to the bottom of GENERAL.SCR or (if dialing up) DIAL.SCR.
  461. ;
  462. output \13                  ; Wake up the VAX
  463. input username:\32          ; Look for login prompt
  464. output USERNAME\13          ; Type username (replace with yours) & CR
  465. set input echo off          ; Privacy, please
  466. input Password:\32          ; expect to see "Password:"
  467. echo \13Type your password: ; Make our own prompt.
  468. output @con                 ; Type in password at your console
  469. output \13                  ; Add a real carriage return
  470. connect                     ; Connect to system
  471. ;
  472. COMMENT - End of VAX/VMS Script
  473.  
  474. ==============================CUT HERE==============================
  475.  
  476. Suppose you sometimes use each one of these different computers, and maybe
  477. other systems as well.  How can you use these scripts to connect to these
  478. various systems?  Just as we did before, we need to store all of these
  479. script files on a disk and tell Kermit which ones we want to use.
  480.  
  481. * Note: In the following examples you would replace PACX.SCR with ROLM.SCR
  482.         after the data cutover in the Fall 1988.
  483.  
  484. Example:
  485.  
  486.    A> KERMIT
  487.  
  488.    MS-KERMIT> TAKE GENERAL.SCR
  489.  
  490.    MS-KERMIT> TAKE DIAL.SCR        (only if you are dialing up)
  491.  
  492.    MS-KERMIT> TAKE PACX.SCR   <or> ROLM.SCR
  493.  
  494.    MS-KERMIT> TAKE CUNIXC.SCR <or> TAKE CU20.SCR <or> TAKE CUVM.SCR    <or>
  495.               TAKE SIM.SCR    <or> TAKE CLIO.SCR <or> TAKE VMS.SCR (choose one)
  496.  
  497. All of this would work just fine in the example above, provided you didn't
  498. take too long between TAKE commands.  You could always use the general
  499. settings, use any method to make the connection, and communicate with any
  500. computer.  There is however a way to define Kermit macros to put these
  501. combinations together for you as we will see in the next message.
  502.  
  503. ------------------------------
  504.  
  505. Kermit Script Files: (PART 4 of 4)
  506.  
  507. This is the fourth and final part of the MS-DOS Kermit script tutorial.  Now
  508. that we can write and use scripts for any connection method and for any
  509. computer, all we need to automate this process further is a method for
  510. combining several scripts into one.  We could use our Kermit initialization
  511. file (MSKERMIT.INI) to define macros to run several scripts at once.
  512.  
  513. Note that all Kermit diskettes are distributed with a file called
  514. MSKERMIT.INI containing commands that are automatically each time you start
  515. up the Kermit program.  If you look at this file you will see a definition
  516. called "ibm" which combines all the parameters set individually at the top
  517. of our CUVM script file (CUVM.SCR) into what is called a macro:
  518.  
  519.    define ibm set par mar,set han xon,set flo n,set loc on
  520.  
  521. By typing "DO IBM" at the KERMIT-MS> prompt, these Kermit commands will
  522. executed.  Since scripts allow us to use commands that we would normally
  523. type at the KERMIT-MS> prompt, we could also use this macro in a script.  We
  524. could take the first four lines out of our CUVM script and add a single
  525. line as long as it is defined in the file MSKERMIT.INI.
  526.  
  527.     do ibm                  ; Parameters defined in MSKERMIT.INI
  528.  
  529. In the same way we could use an editor to define another macro in our
  530. MSKERMIT.INI file.  For example, we could take the last four lines of our
  531. general script (GENERAL.SCR) and define a macro called "default" in our
  532. MSKERMIT.INI file.  Let's assume we always want to begin a Kermit session
  533. with these settings.
  534.  
  535.     define default set par non,set han non,set flo x,set loc of
  536.  
  537. Then we could replace the last four lines in our general script with a
  538. single line:
  539.  
  540.     do default              ; Parameters defined in MSKERMIT.INI
  541.  
  542.    You can even use an editor to modify or create an MSKERMIT.INI file which
  543.    will combine several scripts.  For example, you could combine your
  544.    general script, your Hayes modem script, your PACX script (since you need
  545.    to go through the PACX box currently at Columbia even when you are
  546.    dialing up) and your CUNIXC script. 
  547.  
  548. Example:
  549.  
  550.  define dcunixc take general.scr, take dial.scr, take pacx.scr, take cunixc.scr
  551.  
  552.           A> KERMIT
  553.   
  554.           MS-KERMIT> DO DCUNIXC
  555.  
  556.    And, instead of having to store ALL the script files on your disk, which
  557.    could be tedious if you are using floppy disks, you could define some of
  558.    your scripts in MSKERMIT.INI as macros.  Below GENERAL.SCR, DIAL.SCR and
  559.    PACX.SCR are defined in macros.  
  560.  
  561. Example:
  562.  
  563. GENERAL.SCR defined as a macro:
  564.   def gnrl set speed 9600,set input echo on,set input timeout quit,do default
  565.  
  566. DIAL.SCR defined as a macro:
  567.   def dial set sp 1200,o AT\13,i OK,pau,o ATDT 2808050\13,in 30 CONNECT,pau 2
  568.  
  569. PACX.SCR defined as a macro:
  570.  def pacxmsg ech Turn on your PACX box\13,ech Type carriage return when ready..
  571.  def pacx do pacxmsg, out @con, out \13, input 10 =>, pause 1  
  572.  
  573.  * Note:  The PACX script is defined with two macros because it is so long.
  574.           Notice one macro can call another macro.  For example, the PACX
  575.           macro then invokes the PACXMSG macro. 
  576.  
  577.    The macro in your MSKERMIT.INI file for combining your general script, 
  578.    your dial script, your PACX script and your CUNIXC script would
  579.    presumably look as follows:
  580.  
  581. Example:
  582.  
  583.       define dcunixc do gnrl, do dial, do pacx, take cunixc.scr
  584.  
  585.     But, if we are dialing up, we will not need to see the PACX message since
  586.     there is no PACX box to turn on when ready.  What we need then is another
  587.     macro which expects to dial the PACX -- the "dpaxc" macro which looks as
  588.     follows:
  589.  
  590. Example:
  591.  
  592.       define dpacx do dial, out \13, input 10 =>, pause 1
  593.  
  594.     Then we could define dcunixc as we can see below to make it work properly:
  595.  
  596. Example:
  597.  
  598.       define cunixc do gnrl, do dpacx, take cunixc.scr
  599.  
  600.           A> KERMIT
  601.   
  602.           MS-KERMIT> DO DCUNIXC
  603.  
  604. Note that we will not need to include a "drolm" macro since Rolm doesn't
  605. need to be 'turned on' before using.
  606.  
  607. There are several of these combinations which you could add to your
  608. MSKERMIT.INI file.  Below is an example of an MSKERMIT.INI file which
  609. attempts to combine all of CUCCA's host computer scripts with the various
  610. methods of making such a connection.  You may use this file in place of your
  611. own initialization file, or you may take parts of this file to add to your
  612. own MSKERMIT.INI file.  To find out your macro options type "DO ?" at the
  613. KERMIT-MS> prompt.
  614.  
  615. Notice that you can redefine your keyboard arrangement with the Kermit 
  616. SET KEY command.
  617.  
  618. ==============================CUT HERE==============================
  619.  
  620. ; MS-Kermit 2.30 Initialization File for the IBM PC, XT, AT, PS2, etc.
  621. ;
  622. ; For use with CUCCA systems.
  623. ;
  624. ; GENERAL KERMIT SETTINGS
  625. ;  (You may want to change these to suit your computer or your tastes)
  626. ;
  627. set port 1                 ; set the proper communication port
  628. set speed 9600             ; set baud to match the remote system
  629. set key \96 \27            ; put "escape key" in upper left corner of keyboard
  630. set key \1280 \kbreak      ; put "break key" in the proper place on keypad
  631. set warning off            ; change this to "on" to disallow overwriting files
  632. set terminal vt102         ; emulate a DEC VT102 terminal
  633. set terminal color 0 34 47 ; blue on white background
  634. ;
  635. ; PARAMETER SETTINGS FOR DIFFERENT HOST COMPUTERS AND FRONT ENDS:
  636. ;
  637. ; TYPE "DO DEC" (for DEC-20 systems), "DO VAX" (for VAX/VMS systems),
  638. ; "DO IBM" (for CUVM Line-Mode), "DO UNIX" (for UNIX systems)  
  639. ;
  640. ; THE KERMIT "SET KEY" COMMAND IN THE FOLLOWING EXAMPLES CHANGES THE
  641. ; BACKSPACE KEY SO THAT IT ERASES CHARACTERS.
  642. ;
  643. define default set par non,set han non,set flo x,set loc of,set ke \270 \127
  644. define dec do default
  645. define vax do default
  646. define unix do default
  647. define ibm set par mar,set han xon,set flo n,set loc on,set ke \270 \8
  648. ;
  649. ; GENERAL SCRIPT SETTINGS
  650. ;
  651. def gnrl set speed 9600, set input echo on, set input timeout quit, do default
  652. ;
  653. ; MACROS FOR HAYES MODEMS, PACX, 7171, OR DIRECT CONNECT.
  654. ; (TYPE "DO DIAL", "DO PACX", "DO DIRECT"...)
  655. ;
  656. ; CHANGE THE SPEED TO MATCH YOUR MODEM AND/OR REMOTE COMPUTER IF NEEDED 
  657. ; (300, 1200, 2400, 4800, 9600, etc...), AND CHANGE THE PHONE NUMBER
  658. ; IF NECESSARY, E.G. 2808050 to 8050 IF DIALING FROM INSIDE.
  659. ; (WARNING, PHONE NUMBERS WILL CHANGE WHEN THE ROLM CBX IS INSTALLED.)
  660. ;
  661. def dial set sp 1200,o AT\13,i OK,pau,o ATDT 2808050\13,in 30 CONNECT,pau 2
  662. def pacxmsg ech Turn on your PACX box\13,ech Type carriage return when ready..
  663. def pacx do pacxmsg, out @con, out \13, input 10 =>, pause 1
  664. def dpacx do dial, out \13, input 10 =>, pause 1
  665. def rolm out \13, input 10 MODIFY?, pause 1
  666. ;
  667. ; MACROS FOR CONNECTING TO DIFFERENT CUCCA HOST COMPUTERS (DEC20, UNIX,
  668. ; VM/CMS LINEMODE AND FULLSCREEN) THROUGH A GANDALF LDS-125 PACX BOX.
  669. ; CUVMLM IS FOR LINEMODE CONNECTIONS, CUVMFS IS FOR FULLSCREEN CONNECTIONS.
  670. ; TYPE "DO CU20" to automatically login to the DEC-20 thru the PACX, 
  671. ; "DO CUNIXC", etc.
  672. ;
  673. define cu20b  do gnrl, do pacx, take cu20.scr
  674. define cunixc do gnrl, do pacx, take cunixc.scr
  675. define cuvmlm do gnrl, do pacx, take cuvm.scr
  676. define cuvmfs do gnrl, do pacx, take sim.scr
  677. define clio   do gnrl, do pacx, take clio.scr
  678. ;
  679. ; MACROS FOR LOGGING IN THROUGH THE ROLM SWITCH
  680. ;
  681. define rcunixc do gnrl,  do rolm,  i 20 ALL COMPLETE,  take cunixc.scr
  682. define rcuvmlm do gnrl,  do rolm,  i 20 ALL COMPLETE,  take cuvm.scr
  683. define rcuvmfs do gnrl,  do rolm,  i 20 ALL COMPLETE,  take sim.scr
  684. define rclio   do gnrl,  do rolm,  i 20 ALL COMPLETE,  take clio.scr
  685. ;
  686. ; MACROS FOR DIALING UP CUCCA HOST COMPUTERS THROUGH A HAYES MODEM.
  687. ;
  688. ; TYPE "DO DCU20" TO AUTOMATICALLY LOGIN TO THE DEC-20 WITH A MODEM,
  689. ; "DO DCUNIXC", ETC.  THIS ASSUMES YOU ARE GOING THRU PACX.  IF YOU
  690. ; ARE DIALING DIRECTLY INTO A COMPUTER, YOU WOULD FOLLOW THE EXAMPLES
  691. ; BELOW, REPLACING "DO DPACX" WITH "DO DIAL".
  692. ;
  693. define dcu20b  do gnrl, do dpacx, take cu20.scr 
  694. define dcunixc do gnrl, do dpacx, take cunixc.scr
  695. define dcuvmlm do gnrl, do dpacx, take cuvm.scr
  696. define dcuvmfs do gnrl, do dpacx, take sim.scr
  697. ; (Can't dial up CLIO!)
  698. ;
  699. ; MACROS FOR DIALING UP WITH A HAYES MODEM THROUGH THE ROLM SWITCH.
  700. ;
  701. define drcunixc do gnrl,  do dial,  do rolm, i 20 COMPLETE,  take cunixc.scr
  702. define drcuvmlm do gnrl,  do dial,  do rolm, i 20 COMPLETE,  take cuvm.scr
  703. define drcuvmfs do gnrl,  do dial,  do rolm, i 20 COMPLETE,  take sima.scr
  704. ; (Can't dial CLIO)
  705. ;
  706. ; SAMPLE MACRO FOR DIRECT CABLE AND DIAL CONNECTIONS TO A HOST COMPUTER
  707. ; (VAX/VMS)
  708. ;
  709. define lvms do gnrl,          take vms.scr
  710. define dvms do gnrl, do dial, take vms.scr
  711. ;
  712. echo End of MSKERMIT.INI.
  713. ;
  714. ; End of MSKERMIT.INI.
  715.  
  716.  
  717. ==============================CUT HERE==============================
  718.  
  719. You may want to design your own script files or modify some of the ones we
  720. have shown to suit your own needs.  For more detailed information on any of
  721. the material in the MS-DOS Kermit script tutorial, refer to the MS-DOS
  722. Kermit User Guide available from the User Services Business Office in Room
  723. 321 SIA for $6.50.
  724.  
  725. ------------------------------
  726.  
  727.    ======= END =======
  728.