home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / ibm370 / ikmker.ins < prev    next >
Text File  |  2020-01-01  |  28KB  |  690 lines

  1. MUSIC/SP Kermit 4.3.n Installation Instructions
  2.                      (1994 December)
  3.  
  4. Get the necessary files from the Kermit distribution tape or from BITNET
  5. KERMSRV or elsewhere.  Note that many of the files are generic for
  6. Kermit-370 and may already be available from a local CMS or TSO site.  As
  7. distributed by Columbia, the files are named as follows, all with prefix
  8. IKM or IK0 (I K Zero):
  9.  
  10.    IKMAUX.CMD  Sample EXEC's KERMAIL, etc.
  11.    IKMGUP.ASM  Assembler source for MUSIC-specific part of GUPI
  12.    IKMKER.BWR  A "beware" file, listing known bugs and problems
  13.    IKMKER.DOC  MUSIC Kermit User Guide, plain text
  14.    IKMKER.HLP  Kermit-MUSIC short help file
  15.    IKMKER.INS  Kermit-MUSIC installation instructions (this file)
  16.    IKMKER.NUP  Test updates for MUSIC variant of Kermit-370
  17.    IKMKER.UPD  Updates for MUSIC variant of Kermit-370
  18.    IKMMAC.ASM  Assembler source for MUSIC-specific macros
  19.    IKMUTL.ASM  Assembler source for MUSIC-specific routines
  20.    IK0CMD.ASM  Assembler source for command handler
  21.    IK0COM.ASM  Assembler source for global code
  22.    IK0DEF.ASM  Assembler source for parameter definitions
  23.    IK0DOC.ASM  Assembler source with brief history
  24.    IK0GUP.ASM  Assembler source for generic update program GUPI
  25.    IK0KAN.ASM  Assembler source for Kanji character translation
  26.    IK0MAC.ASM  Assembler source for generic Kermit macros
  27.    IK0MAI.ASM  Assembler source for storage initialization
  28.    IK0PRO.ASM  Assembler source for generic routines
  29.  
  30. The following files are not necessary for installation, but may be of
  31. some interest.
  32.  
  33.    IKCACT.ASM  Assembler source for optional accounting exit routine
  34.    IKMHDR.MSS  Scribe source for producing IKMKER.DOC
  35.    IKMKER.ANN  Text of Kermit-MUSIC announcement for the current version
  36.    IKMKER.LPT  Line-printer (paginated) equivalent of IKMKER.DOC
  37.    IKMKER.MSS  Scribe source for MUSIC part of IKMKER.DOC
  38.    IKMKER.PS   PostScript equivalent of IKMKER.DOC
  39.    IK0AAA.HLP  Kermit-370 implementation notes, supported environments
  40.    IK0CON.HLP  Notes on supporting other terminal controllers
  41.    IK0KER.ANN  Text of generic Kermit-370 4.3 announcement
  42.    IK0KER.MSS  Scribe source for generic part of IKMKER.DOC
  43.    IK0KER.UPD  Update history for Kermit-370
  44.    IK0POR.HLP  Notes on porting Kermit-370 to other systems
  45.    IK0VCS.PKT  Czech-language version of Kermit-370 source (updates)
  46.    IK0VDE.PKT  German-language version of Kermit-370 source (updates)
  47.    IK0VER.FOR  Comparison program for generating update files
  48.    IK0VES.PKT  Spanish-language version of Kermit-370 source (updates)
  49.    IK0VFI.PKT  Finnish-language version of Kermit-370 source (updates)
  50.    IK0VFR.PKT  French-language version of Kermit-370 source (updates)
  51.    IK0VIT.PKT  Italian-language version of Kermit-370 source (updates)
  52.    IK0VNL.PKT  Dutch-language version of Kermit-370 source (updates)
  53.    IK0VPL.PKT  Polish-language version of Kermit-370 source (updates)
  54.    IK0VPT.PKT  Portuguese-language version of Kermit-370 source (updates)
  55.    IK0VRU.PKT  Russian-language version of Kermit-370 source (updates)
  56.  
  57. Kermit-MUSIC installation consists of a a few simple steps.  It is
  58. recommended that the process normally be carried out in the $KRM code,
  59. but any code with sufficient privileges will suffice for making a
  60. "personal" Kermit.  Specifically, the account must have "LSCAN" (so that
  61. the assembler can find system macros) and "DEFTIME(NL)" (so that the
  62. default service unit limit can be exceeded).  A Kermit for use by
  63. non-privileged users must be installed under $KRM.  The process requires
  64. that you clip the REXX exec called IKMINS from the end of this file and
  65. execute it in a directory containing all the Kermit distribution files
  66. with names exactly as obtained from Columbia.  There is no need to
  67. rename source files from "ASM" to "S", for example.  IKMINS asks a few
  68. questions as it goes, but it suggests default answers in every case, and
  69. repeatedly hitting ENTER normally gives the correct results.  You can
  70. quit at a prompt by entering "STOP".  The final products of installation
  71. are files KERMIT.LMOD, KERMIT, and SYSTEM.KERMHELP.  These files are
  72. respectively the executable program, the executor, and the help file.
  73. If the last two did not already exist as public files in another
  74. directory, they are established as such by this procedure; otherwise,
  75. the new ones simply remain private.  If any needed files are missing, or
  76. any step fails, IKMINS halts and complains about the problem.
  77.  
  78. One intermediate product of Kermit installation is GUPI (Generic Update
  79. Program), which applies updates to the base code, and which can be used
  80. as a tool for updating other software as well.  GUPI supports the same
  81. update syntax as the CMS UPDATE utility.  See step 4 below for an
  82. executor file to make GUPI available as a general update utility.  The
  83. syntax for execution is simply "GUPI <base> <updates> <output>", where
  84. the bracketed lower-case words represent file names.
  85.  
  86. The updates for Kermit come from as many as three places: IKMKER.UPD
  87. (the required official updates), IKMKER.NUP (the optional current test
  88. version), and KERMIT.LOCAL (optional local mods).  If either optional
  89. file doesn't exist, IKMINS reports that the corresponding category of
  90. updates won't be applied, and then goes on.  Installation can readily be
  91. halted if a file is missing by accident.
  92.  
  93. The sources for Kermit and GUPI are in many pieces, some generic for
  94. Kermit-370 and some specific to MUSIC.  All the necessary pieces are
  95. sequenced in columns 73-80 so that the numbers form a strictly
  96. increasing sequence when the pieces are correctly "pasted" together.  It
  97. is important to preserve the original sequence numbers so that updates,
  98. if any, can be applied to the source.
  99.  
  100. The steps performed in installation (most are automatic):
  101.  
  102. 1. Collect the files from the Kermit distribution into the desired
  103.    directory on a suitably privileged account.
  104.  
  105. 2. Assemble the Generic Update Program GUPI.  This program is required
  106.    to apply updates to the Kermit-MUSIC source.  (automatic)
  107.  
  108. 3. Link the object deck created by the previous step, producing
  109.    GUPI.LMOD.  (automatic)
  110.  
  111. 4. Create the GUPI executor file if you want to use GUPI as a general
  112.    utility.  The following will suffice.
  113.  
  114.       /SYS NOPRINT,REGION=1024
  115.       /LOAD XMON
  116.       GUPI N($KRM:GUPI.LMOD)
  117.  
  118. 5. Build the base Kermit source so that you can apply modifications over
  119.    it.  Merge the source files in the order IK0DOC, IK0MAC, IKMMAC,
  120.    IK0DEF, IK0MAI, IK0COM, IK0CMD, IK0KAN, IKMUTL, IK0PRO, and save the
  121.    result as KERMIT.BASE.S.  (automatic)  IK0KAN is optional.  Including
  122.    it adds about 32 Kbytes to the Kermit program.
  123.  
  124. 6. Apply the updates using GUPI.  Note: this operation requires a region
  125.    of at least 1024K.  (automatic)
  126.  
  127. 7. Assemble the Kermit source.  (automatic)
  128.  
  129. 8. Link the object deck created by the previous step together with
  130.    system subroutines.  (automatic)
  131.  
  132. 9. Create the Kermit executor file to permit running the KERMIT
  133.    program with the proper system parameters.  The file MUST be saved
  134.    as a PUBL,XO file so that the program privileges are assigned
  135.    properly by the system.  (automatic)
  136.  
  137. 10. Kermit-MUSIC requires the LSCAN privilege, since it does a save
  138.     library scan directly.  You must modify either the system module
  139.     LOOKUP or the macro invoked by LOOKUP called $MCM:USERTBL.M.  Add
  140.     the line
  141.  
  142.           FILNAM '$KRM:KERMIT',(LSCAN,0)
  143.  
  144.     to either of the two files.  Reassemble the module LOOKUP and make
  145.     sure that the new object deck is used when rebuilding the nucleus.
  146.     If you do not give Kermit this privilege, the program will abend on
  147.     user codes that do not have LSCAN.
  148.  
  149. 11. Copy the file IKMKER.HLP to the MUSIC file $KRM:SYSTEM.KERMHELP
  150.     and save it as a PUBLIC file.  This file is displayed when the
  151.     HELP subcommand is issued to Kermit-MUSIC.  (automatic)
  152.  
  153. 12. Install any desired auxilliary commands from IKMAUX CMD.  These are
  154.     sample EXEC's and may need to be tailored to your site.
  155.  
  156.  
  157.                    * * Performance tuning * *
  158.  
  159. Kermit-MUSIC, like other Kermits, can transfer files with a minimum of
  160. tuning at installation.  However, getting the best performance may
  161. require further efforts.  For example, the 80-byte default packet size
  162. is "safe" but is probably not the optimum.  The largest usable size must
  163. be determined at each site for each type of connection, and in each
  164. direction of transfer.  The largest size for uploads can be made the
  165. default by inserting a SET RECEIVE PACKET subcommand into the system
  166. initialization file SYSTEM.KERMINI.  The download packet limit must be
  167. set in the micro Kermit.  Another means of improving performance is to
  168. determine which control characters can be transmitted "as is" and avoid
  169. quoting them via the SET CONTROL-CHAR UNPREF subcommand.  Regardless of
  170. the settings, Kermit-MUSIC always prefixes the SEND start-of-packet and
  171. end-of-line, the handshake, and XOFF, but there may be other unsafe
  172. control characters.  These must be determined empirically.  There is a
  173. subcommand to simplify saving the the result of such experiments: GIVE
  174. CON stores the subcommands needed to achieve the current control
  175. character table arrangement into a file.
  176.  
  177.  
  178.                    * * Alternate Languages * *
  179.  
  180. Kermit-370 now can be installed in a variety of languages.  The messages
  181. within Kermit have been gathered into a few places in the code, and they
  182. can all be replaced during installation with those of a chosen language.
  183. The replacements are contained in distribution files with names like
  184. ik0vXX.pkt, where "XX" is the two-letter language code according to ISO
  185. 639.  These files contain the messages in an encoded form using only the
  186. character repertoire of ASCII, so that even the extended characters can
  187. pass successfully through a variety of transmission mechanisms.
  188.  
  189. Here are the instructions for applying the changes:
  190.  
  191. 1. Use Kermit itself to decode the language-specific update file into
  192.    the proper IBM code page.  To do this, start Kermit (4.2.6 or
  193.    higher) and then select the desired code page, e.g.,
  194.  
  195.          SET FILE CHARACTER-SET CP500
  196.  
  197.    Then tell Kermit to use ik0vXX.pkt, via
  198.  
  199.          SIMULATE IK0Vxx.PKT
  200.          RECEIVE
  201.  
  202.    Kermit will then quickly decode and (attempt to) store the file with
  203.    the name ik0vXX.upd.  If you already have a file of that name, the
  204.    FILE COLLISION setting will determine what happens (overwrite the
  205.    original, pick a new name for the new file, or whatever).
  206.  
  207. 2. ik0vXX.upd contains the updates for all four major variants of
  208.    Kermit-370, and you must edit the file to extract the generic and
  209.    MUSIC-specific parts.
  210.  
  211. 3. Concatenate the MUSIC and generic parts of ik0vXX.upd to KERMIT.LOCAL
  212.    and re-install.
  213.  
  214.                     * * Accounting Routine * *
  215.  
  216. If you wish to use the optional accounting exit routine with Kermit,
  217. you must create the object for it and load it with Kermit.  These steps
  218. are performed automatically if a file called IKMACT.ASM exists in the
  219. installation directory and if the installer gives approval to IKMINS.
  220. The sample currently available was written for CMS and must be adapted
  221. to run under MUSIC.  Any user who does so is urged to contribute the
  222. MUSIC version for inclusion in the Kermit distribution under the name
  223. IKMACT.ASM.  Even when such a MUSIC-specific sample is available, you
  224. should examine the source and customize it to your installation's needs
  225. before using it.
  226.  
  227.                        * * Configuration * *
  228.  
  229. The IBM mainframe and its communications front end (3705, 7171, etc.)
  230. usually require that parity be used by any asynchronous ASCII device
  231. that wishes to communicate with it.  Exactly which kind of parity is
  232. site-dependent.  At Columbia, the 3705 requires Mark parity, and the
  233. 7171 requires Even parity.  Make sure your users know to use the
  234. appropriate parity setting, as well as any other settings required for
  235. IBM mainframe communication (see p.36-39 of the Kermit book).
  236.  
  237. For linemode transfers, the ASCII/EBCDIC translation in the front end is
  238. a key factor.  Kermit-MUSIC uses an ASCII/EBCDIC translation table which
  239. conforms to the one given in the IBM System/370 Reference Summary.  If
  240. your site's translation table is incompatible with the one Kermit uses,
  241. then enter the appropriate SET ATOE/ETOA/TATOE/TETOA subcommands in the
  242. SYSTEM KERMINI file.  As long as the system tables are invertible with
  243. respect to the printable ASCII characters (even if the A-to-E and E-to-A
  244. tables are not the inverses of each other), the SET subcommands can
  245. compensate.  However, if your system's ASCII/EBCDIC tables are not
  246. invertible, Kermit will not and cannot work; you must change your
  247. system's tables.  Refer to the generic Kermit-370 chapter of the User's
  248. Guide for a step-by-step customization procedure (see the section on
  249. translation tables).
  250.  
  251. Kermit-MUSIC operation is possible for many types of protocol converters;
  252. it requires only that the converter have some kind of transparent mode.
  253. Be sure the converter is configured so that the graphics or transparent
  254. mode, whatever it is called, is enabled.  See IK0AAA.HLP for a list of
  255. front ends that are known to work and for a collection of notes and
  256. special warnings about some of them.  Some further installation details
  257. follow for specific devices.
  258.  
  259. When MUSIC Kermit is to be used with a 7171, make sure the 7171 is set up
  260. with its "keyboard lock delay" parameter set to 0.  Otherwise, the
  261. "terminal" will hang whenever MUSIC Kermit clears the screen.  This
  262. happens consistently when the parameter is set to 10, and not at all
  263. when set to 0.  For numbers in between, the higher the number, the more
  264. it happens.
  265.  
  266. There is another problem in the 7171 that can cause Kermit file
  267. transfers to abort after a flurry of retransmissions if XON/XOFF flow
  268. control is used by the receiving Kermit, or even by hardware in between
  269. the 7171 and the receiver.  To prevent this problem, set the 7171 flags
  270. so that XOFF is not a valid terminator of a transparent read.  See page
  271. 4-20 of "IBM 7171 Reference Manual and Programming Guide" (IBM
  272. publication number GA27-0021).
  273.  
  274. Kermit operation through a Renex protocol converter generally requires
  275. that type-ahead be turned off.
  276.  
  277. Kermit operation is possible through an IBM 3708 front end in two
  278. different configurations.  In the first, the terminal line must be set
  279. for either "protocol enveloping" or "dynamic" mode, and a session must
  280. be set for line-at-a-time operation for Kermit to work.  Other important
  281. details of the terminal configuration are: (1) the terminal must be
  282. specified as a TWX device, (2) the SSCP format should be set to USSNTO,
  283. (3) the terminal type ID should be set to 05, (4) the line should be set
  284. for 8, or possibly 7, data bits and 1 stop bit, (5) there should be no
  285. "read prompt", and (6) the so-called "alternate" translation table
  286. (number 3) should be selected.  Kermit-MUSIC may also need to be
  287. configured because some models of the 3708 (or some environments) do not
  288. pass the normal packet character SOH (code 1, CTRL-A).  A suitable
  289. substitute is HT (code 9, CTRL-I).  Alternatively, or additionally, it
  290. may help to set the 3708 "interface type" to 0.
  291.  
  292. The second possible 3708 configuration is "protocol conversion" mode and
  293. makes use of the FULLSCREEN type in Kermit, which is also suitable for
  294. many other kinds of protocol converter.  The basic setup consists of the
  295. following Kermit subcommands.
  296.  
  297.      .... mainframe .....        ....... PC .........
  298.      SET CONTROLLER FULL         set send start 62
  299.      SET RECEIVE START 62        set receive start 62
  300.      SET SEND START 62           set block b
  301.      SET BLOCK B                 set handshake none
  302.      SET HANDSHAKE 0
  303.  
  304. The 62's (Greater-than sign) may be replaced by some other decimal code
  305. for a printable character.  For best results, choose a character that
  306. seldom appears in the files you will be transferring.  In particular,
  307. avoid the Control, Eighth-bit, and Repeat prefixes.  Packet sizes are
  308. automatically restricted by Kermit-MUSIC, so you needn't set them unless
  309. conditions require packets shorter than the default (77).  Flow control
  310. may be needed to keep up with the data rate on some equipment.  The
  311. block check type should be set to "B" only if the protocol converter is
  312. overzealous in optimizing the data stream -- there are hazards in using
  313. any type other than "1" because of all the packet echoing.  Refer to
  314. IK0AAA.HLP for such details.  Note that the translation of characters
  315. imposes the same setup requirements on FULLSCREEN mode as on the
  316. traditional TTY mode (linemode).  See the user's guide (IKMKER.DOC).
  317.  
  318. Kermit-MUSIC supports file transfers through the IBM 3174 AEA with B2
  319. microcode, but support is restricted to terminals with the ASCII
  320. Graphics capability in three ways that may require compensating
  321. installation:
  322.  
  323. a) The terminal type must be defined in the 3174 to support graphics
  324.    (only the built-in VT241 and Tektronix 4205 types plus suitable
  325.    user-defined terminal types).  IBM's AEA Reference describes how
  326.    to set up terminal tables.
  327.  
  328. b) The line must be defined without a Host Addressable Printer.
  329.  
  330. c) If the 3174 is owned by VTAM, the connection must be made with a
  331.    logmode that allows the Read Partition Query (such as M2SDLCQ).
  332.  
  333. -------- cut here for IKMINS (invoke for easy installation) ---------
  334. /INCL REXX
  335. /*---------------------------------------------------------------------
  336.                 I K M I N S
  337.  Complete Kermit installation EXEC
  338.    J.F.Chandler - 1994 Oct 20 with updates through November
  339.  For an explanation of the operations in this EXEC, see IKMKER.INS and
  340.  IKMKER.BWR in the Kermit distribution.  Obtain the distribution files
  341.  (step 1 in "INS") before running this EXEC.  Installation requires
  342.  about 6MB of disk work space and privileges LSCAN DEFTIME(NL).
  343.  
  344.  Optional customization: to create a PRINT file of the update details
  345.  and assemblies, change the definition of fl.PRKEEP from NO to YES.  In
  346.  the standard version of this EXEC, the print files are purged unless
  347.  there are errors in the installation.
  348.  
  349.  Optional customization: to use extra options on the assembly step(s),
  350.  insert them into the definition of fl.ASMOPTS.  These will be passed
  351.  to the assembler "as is".  Also, set fl.LMDRCL to the desired value
  352.  for the record length of LMOD's produced by this command.
  353.  -------------------------------------------------------------------*/
  354. Signal on NOVALUE
  355.  
  356. /*------------ Initialize some variables (set defaults) */
  357. edt.1 = '/SYS REG=640'
  358. edt.2 = '/FILE 1 UDS(&&TEMP) NREC(15000) DEF BUFNO(0)'
  359. edt.3 = '/INC *COM:EDITOR'
  360. edt.0 = 3
  361.  
  362. fl.PRKEEP = 'NO'    /* If YES, keep listing files, even if no error */
  363. fl.ASMCMD = ''      /* Name of assembler (get from SYSASM if null) */
  364. fl.ASMOPTS = ''     /* Extra assembler options */
  365. fl.LMDRCL = 64      /* Length for linked programs */
  366.  
  367. /*  All these options are verified with the installer */
  368. fl.BASE = 'YES'     /* Recreate merged base source */
  369. fl.KANJ = 'NO'      /* Include Kanji support in base */
  370. fl.CLOB = 'YES'     /* Replace current Kermit source */
  371. fl.LCL  = 'NO'      /* Include local updates (becomes YES if exist) */
  372. fl.NUP  = 'NO'      /* Include test updates (becomes YES if exist) */
  373. fl.ACT  = 'NO'      /* Include accounting exit */
  374.  
  375. /*--------------- Get name of preferred assembler */
  376. If fl.ASMCMD = '' Then Do
  377.    fl.ASMCMD = 'ASM'     /* "Normal" name */
  378.  
  379.    'MUSIO READ  *COM:SYSASM ALL'
  380.    'MUSIO CLOSE *COM:SYSASM ALL'
  381.  
  382.    nrec = Queued()
  383.    Do i=1 To nrec
  384.       Pull verb name .
  385.       If verb = '/LOAD' Then fl.ASMCMD = name
  386.       End
  387.    End
  388.  
  389. /*------------------------------- Announce and confirm options */
  390. 'CLS'
  391. Say "IKMINS installs Kermit in the current directory using distribution"
  392. Say "sources and updates (assumed to be present)."
  393. Say "This procedure will use '"fl.ASMCMD"' for assemblies."
  394. Say ""
  395. Say "To halt installation, enter 'STOP' at any prompt..."
  396. Say ""
  397. Say "Before installing, search 'IKMKER.BWR' for relevant optional mods.  Local"
  398. Say "updates should be bundled into 'KERMIT.LOCAL'."
  399. Say ""
  400.  
  401. kills = ''
  402.  
  403. /*----------- ************ S T E P   INS 2 */
  404. /*---------- Merge all required source files to make GUPI.S */
  405. Call CHECK 'GUPI.LMOD','NO'
  406.  
  407. If checkrc<>0 Then Do
  408.    Say 'Installing GUPI...'
  409.    Call CHECK 'GUPI.BASE.S','NO'
  410.    If checkrc = 0 Then 'PURGE GUPI.BASE.S'
  411.    gupcmps = 'IK0MAC IKMMAC IKMGUP IK0GUP'
  412.    Do i = 1 To Words(gupcmps)
  413.       Call CHECK Word(gupcmps,i)'.ASM','YES'
  414.       End i
  415.    Call CHECK 'GUPI.S','NO'
  416.    grc = checkrc
  417.  
  418.    Queue '/PARM GUPI.S NEW 80 FC'
  419.    Do i = 1 To edt.0 ;  Queue edt.i ;  End
  420.    Do i = 1 To Words(gupcmps)
  421.       Queue 'MERGE' Word(gupcmps,i)'.ASM'
  422.       End i
  423.    Queue 'TOP'
  424.    Queue 'CASE R'
  425.    Queue 'C /COPY  //*FC10'
  426.    If grc = 0 Then Queue 'PURGE GUPI.S'
  427.    Queue 'FILE'
  428.  
  429.    Call DOIT 'EXEC','merging GUPI'
  430. /*----------------------------------- Assemble GUPI */
  431.    name = 'GUPI'
  432.    Call ASM
  433.  
  434. /*----------- ************ S T E P   INS 3 */
  435. /* ------------------------------- Link-Edit GUPI */
  436.    loads = 'GUPI'
  437.    Call LKED
  438. /*-------------------------------- Bootstrap GUPI if necessary */
  439.    Call CHECK 'IKMGUP.UPD','NO'
  440.    If checkrc = 0 Then Do
  441.       Say 'Updating GUPI...'
  442.       'RENAME GUPI.S GUPI.BASE.S'
  443.       Call GUPI 'GUPI.BASE.S','IKMGUP.UPD','GUPI.S'
  444.       Call ASM
  445.       Call LKED
  446.       End
  447.    End
  448.  
  449. /*--------------------------- Make sure files are present */
  450. Call CHECK 'IKMKER.BWR','YES'
  451. Call CHECK 'IKMKER.HLP','YES'
  452. Call CHECK 'KERMIT.S','NO'
  453. urc = checkrc
  454. Call CHECK 'KERMIT.BASE.S','NO'
  455. brc = checkrc
  456. If urc = 0 Then Call ASK 'CLOB','Updated source already exists - replace it'
  457. If fl.CLOB = 'YES' & brc = 0 Then,
  458.    Call ASK 'BASE','Base source already exists - redo it'
  459.  
  460. If urc = 0 Then Say '70'x
  461.  
  462. If fl.CLOB = 'YES' Then Do
  463.    Call CHECK 'IKMKER.UPD','YES'
  464.    updcmps = 'IKMKER.UPD'
  465.    Call CHECK 'IKMKER.NUP','NO'
  466.    If checkrc = 0 Then Do
  467.       fl.NUP  = 'YES'
  468.       Call ASK 'NUP','Use updates from IKMKER.NUP'
  469.       If fl.NUP = 'YES' Then updcmps = updcmps||' IKMKER.NUP'
  470.       End
  471.    Else Say 'No test updates will be applied'
  472.    Call CHECK 'KERMIT.LOCAL','NO'
  473.    If checkrc = 0 Then Do
  474.       fl.LCL  = 'YES'
  475.       Call ASK 'LCL','Any local updates to apply'
  476.       If fl.LCL = 'YES' Then updcmps = updcmps||' KERMIT.LOCAL'
  477.       End
  478.    Else Say 'No local updates will be applied'
  479.  
  480.    Call ASK 'KANJ','Include Kanji support'
  481.    p1 = 'IK0DOC IK0MAC IKMMAC IK0DEF IK0MAI IK0COM IK0CMD IKMUTL'
  482.    srccmps = p1 'IK0PRO'
  483.    If fl.KANJ = 'YES' Then srccmps = p1 'IK0KAN IK0PRO'
  484.    Do i = 1 To Words(srccmps)
  485.      Call CHECK Word(srccmps,i)'.ASM','YES'
  486.      End i
  487.    Say '70'x
  488.    End
  489.  
  490. /*----------------------------------- Make optional accounting exit */
  491. Call CHECK 'IKMACT.ASM','NO'
  492. If checkrc = 0 Then Do
  493.    fl.ACT = 'YES'
  494.    Call ASK 'ACT','Include optional accounting exit'
  495.    End
  496. If fl.ACT = 'YES' Then Do
  497.    Call CHECK 'IKMACT.UPD','NO'
  498.    If checkrc = 0 Then Do
  499.       Say 'Updating KACCT...'
  500.       Call GUPI 'IKMACT.ASM','IKMACT.UPD','KACCT.S'
  501.       End
  502.    Else Do
  503.       Call CHECK 'KACCT.S','NO'
  504.       Queue '/PARM KACCT.S NEW 80 fc'
  505.       Do i = 1 To edt.0 ;  Queue edt.i ;  End
  506.       Queue 'MERGE IKMACT.ASM'
  507.       If checkrc = 0 Then Queue 'PURGE KACCT.S'
  508.       Queue 'FILE KACCT.S'
  509.  
  510.       Call DOIT 'EXEC','copying KACCT'
  511.       End
  512.    End
  513.  
  514. /*----------- ************ S T E P   INS 5 */
  515.  
  516. /*----------------------------------- Make base source(s) */
  517. If fl.CLOB = 'YES' Then Do
  518.    If fl.BASE = 'YES' Then Do
  519.       Say 'Merging base source...'
  520.       Queue '/FILE 7 N(KERMIT.BASE.S) NEW(REPL) LR(80) SP(700)'
  521.       Queue '/INCL *COM:UTIL'
  522.       Queue '$NOLIST'
  523.       Queue '$PUNCH'
  524.       Queue '$NOCTL'
  525.       Do i = 1 to Words(srccmps)
  526.          Queue '/INCL' Word(srccmps,i)'.ASM'
  527.          End i
  528.  
  529.       Call DOIT 'EXEC','merging'
  530.       End
  531.  
  532.    Say 'Merging updates...'
  533.    Queue '/FILE 7 N(KERMIT.UPD) NEW(REPL) LR(80) RECFM(VC) SP(100)'
  534.    Queue '/INCL *COM:UTIL'
  535.    Queue '$NOLIST'
  536.    Queue '$PUNCH'
  537.    Queue '$NOCTL'
  538.    Do i = 1 to Words(updcmps)
  539.       Queue '/INCL' Word(updcmps,i)
  540.       End i
  541.  
  542.    Call DOIT 'EXEC','merging updates'
  543.    kills = kills 'KERMIT.UPD'
  544.    End
  545.  
  546. /*----------- ************ S T E P   INS 11 */
  547.  
  548. /*-------------------------------------- Make help file */
  549. Call CHECK 'SYSTEM.KERMHELP','NO'
  550. Queue '/PARM SYSTEM.KERMHELP NEW'
  551. Do i = 1 To edt.0 ;  Queue edt.i ;  End
  552. Queue 'MERGE IKMKER.HLP'
  553. If checkrc = 0 Then Queue 'PURGE SYSTEM.KERMHELP'
  554. Queue 'FILE * PUBL'
  555. Queue 'FILE'
  556.  
  557. Call DOIT 'EXEC','copying help'
  558. /*----------- ************ S T E P   INS 6 */
  559.  
  560. /*-------------------------------------- Apply updates */
  561. If fl.CLOB = 'YES' Then Do
  562.    Say 'Updating Kermit source...'
  563.    Call GUPI 'KERMIT.BASE.S','KERMIT.UPD','KERMIT.S'
  564.    End
  565.  
  566. /*----------- ************ S T E P   INS 7 */
  567.  
  568. /*-------------------------------------------- Assemble Kermit */
  569. Say 'Assembling...'
  570. name = 'KERMIT'
  571. Call ASM
  572. loads = 'KERMIT'
  573. If fl.ACT = 'YES' Then Do
  574.   loads = loads||' KACCT'
  575.   name = 'KACCT'
  576.   Call ASM
  577.   End
  578.  
  579. /*----------- ************ S T E P   INS 8 */
  580.  
  581. Say 'Linking Kermit ...'
  582. name = 'KERMIT'
  583. Call LKED
  584.  
  585. /*----------- ************ S T E P   INS 9 */
  586.  
  587. /*-------------------------------------- Make executor */
  588. Call CHECK 'KERMIT','NO'
  589. If checkrc <> 0 Then Do
  590.    Queue '/PARM KERMIT NEW'
  591.    Do i = 1 To edt.0 ;  Queue edt.i ;  End
  592.    Queue 'I /SYS NOPRINT,REGION=384'
  593.    Queue 'I /LOAD XMON'
  594.    Queue 'I KERMIT N($KRM:KERMIT.LMOD)'
  595.    Queue 'FILE * PUBL XO'
  596.    Queue 'R KERMIT N(KERMIT.LMOD)'
  597.    Queue 'FILE'
  598.  
  599.    Call DOIT 'EXEC','making executor'
  600.    End
  601.  
  602. /*---------------------------------- Purge the intermediate stuff */
  603. If fl.PRKEEP = 'NO' Then Do i = 1 To Words(kills)
  604.    'PURGE' Word(kills,i)
  605.    End i
  606.  
  607. Exit
  608.  
  609. /*---------------------------------------------------------------- */
  610. /*----------------------------------- Confirm existence of a file */
  611. CHECK: Procedure Expose checkrc
  612. Parse Arg name,insist
  613. filename = '.\'||name
  614. Call MFACT 'CHECKRC','EXTRACT.','FILENAME'
  615. If checkrc <> 0 & insist='YES' Then Do
  616.    Say 'File' name 'not found.'
  617.    Signal DONE
  618.    End
  619. Return
  620. /*-------------------------------- Ask for possible override (yes/no) */
  621. ASK: Procedure expose fl.
  622. Parse Arg a1,msg
  623. defmsg = '(default:' fl.a1')?'
  624. x = 0
  625. Do While x = 0
  626.   Say msg defmsg
  627.   Parse Upper Pull newval
  628.   x =        Find('.  .Y .YES .N .NO .STOP', '.'||newval)
  629.   End
  630. If newval = 'STOP' Then Signal QUIT
  631. fl.a1 = Word(fl.a1||' YES YES NO  NO',x)
  632. Return
  633. /*----------------------------------- Assemble */
  634. ASM: Procedure Expose fl. name kills
  635. Queue '/FILE SYSPRINT N('name'.LST) NEW(REPL) LR(121) SP(600)'
  636. Queue '/FILE SYSPUNCH N('name'.OBJ) NEW(REPL) SP(100)'
  637. Queue '/FILE SYSLIB PDS($MCM:*.M,$MCU:*.M)'
  638. Queue '/FILE SYSUT1 N(&&TEMP) NEW DELETE RECFM(V) SP(600)'
  639. Queue '/FILE SYSUT2 N(&&TEMP) NEW DELETE RECFM(V) SP(600)'
  640. Queue '/FILE SYSUT3 N(&&TEMP) NEW DELETE RECFM(V) SP(600)'
  641. Queue '/SYS REG=2048,TIME=MAX'
  642. Queue '/LOAD' fl.ASMCMD
  643. Queue '/JOB NOGO'
  644. Queue '/OPT XREF,DECK,LIST,'fl.ASMOPTS
  645. Queue '/INC' name'.S'
  646.  
  647. Call DOIT 'EXEC','assembling '||name
  648. kills = kills name'.LST'
  649. Return
  650. /*----------------------------------- Link edit */
  651. LKED: Procedure Expose fl. name loads kills
  652. Queue '/FILE 6    N('name'.MAP)  NEW(REPL) LR(121)'
  653. Queue '/FILE LMOD N('name'.LMOD) NEW(REPL) RECFM(F) LRECL('fl.LMDRCL') SHR'
  654. Queue '/LOAD LKED'
  655. Queue '/JOB MAP,NOGO,PRINT,STATS,NAME='name',MODE=OS'
  656. Queue '.ORG 4A00'
  657. Do i = 1 To Words(loads)
  658.   Queue '/INC' Word(loads,i)||'.OBJ'
  659.   End i
  660.  
  661. Call DOIT 'EXEC','link-editing '||name
  662. kills = kills name'.MAP'
  663. Return
  664. /*----------------------------------- Apply GUPI */
  665. GUPI: Procedure Expose fl.
  666. Parse Arg old,upd,new
  667. parms = old upd new
  668. Queue '/PARM' parms
  669. Queue '/SYS NOPRINT,REGION=2048'
  670. Queue '/FILE LMOD N(GUPI.LMOD)'
  671. Queue '/LOAD XMON'
  672. Queue 'GUPI'
  673.  
  674. Call DOIT 'EXEC','updating'
  675. Return
  676.  
  677. DOIT: Procedure
  678. Parse Arg cmd,oprn
  679. cmd
  680. If rc <> 0 Then Do
  681.    Say ' Error' rc 'in' oprn
  682.    Signal DONE
  683.    End
  684. Return
  685. /*----------------------------------- Error exits */
  686. QUIT: Say 'Stopping...'
  687. DONE: Exit 100
  688. NOVALUE: Say 'No value in line' sigl':' Sourceline(sigl)
  689.       Exit 100
  690.