home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / JSAGE / ZSUS / SUBSCRIP / ZSUS1-04.LZH / HUP.CMD < prev    next >
OS/2 REXX Batch file  |  1992-05-25  |  6KB  |  145 lines

  1.  
  2.  
  3. HUP - Help UPdate alias
  4. =======================
  5. By: Ed McGovern
  6.  
  7. Revision History
  8. ----------------
  9. Rev 0    Apr 8, 1990    Original Release
  10.  
  11. GENERAL
  12. =======
  13. This group of scripts, when added to your ALIAS.CMD file will allow
  14. the files to be extracted from Bill Tishey's Z3HELP##.LBR's and added
  15. to the individual [ALPHA].LBR files.  Three methods of operation are
  16. supported.  They are:
  17.  
  18.     1. Extraction and insertion without editing          [HUP]
  19.     2. Extraction and editing of Menu files before insertion  [HUP1]
  20.     3. Extraction and editing of All files before insertion   [HUP1A]
  21.  
  22. The Aliases are invoked by typing "HUP ##","HUP 1 ##", or 
  23. "HUP 1A ##", where ## is the number of the help library to be added
  24. to the help system.  For those who use HUP1 or HUP1A, HUP2 must be
  25. invoked after editing is complete. (See NOTE 5 under the scripts).
  26.  
  27. The scripts are based on the setup of my system which is included to
  28. ease modification for your system.  I normally am logged into a clean
  29. user area (work) which contains no files, this area should be 2 times
  30. the size of the Z3HELP##.LBR if using HUP and 3 to 4 times if using
  31. HU1 or HUP1A.  The user areas referred to in the scripts are:
  32.  
  33.     HELP:    User area where all the [ALPHA].LBR files are located
  34.     NEW:    A subdirectory to which I download all new files
  35.     ROOT:    The area containing all user files.  This is only
  36.         referenced with the REG command because for some
  37.         unrecalled reason, I have both the intrinsic and
  38.         external (REG.COM) available.
  39.  
  40. To use these scripts the following programs should be available on the
  41. path in addition to COMMAND.COM (ARUNZ) and ALIAS.COM:
  42.  
  43.     CRUNCH.COM    latest version
  44.     LBREXT.COM    renamed to LEX (NOTE use Vers 3.0 or later)
  45.     LPUT.COM    latest version
  46.     REG.COM        latest version
  47.  
  48. If you have any difficulty in using these scripts, or any suggestions
  49. for improvement - please leave me a message on Jay Sage's Z-NODE 3 or
  50. on GENIE to Ed-MCGOVERN or call (516) 224-5935 after 6pm or weekends.
  51.  
  52. THE SCRIPTS THEMSELVES:
  53. =======================
  54.  
  55. HUP        lex new:z3help$1 *.hzp;root:reg s6 65; hup3
  56. HUP1        lex new:z3help$1 *.hzp /o;lex new:z3help$1 ?.hzp /uo
  57. HUP1A        lex new:z3help$1 *.hzp /uo
  58. HUP2        era *.bak;crunch *.hlp /o ;root:reg s6 65; hup3
  59. HUP3        fi;if ex $ra06*.hzp;lput help:$ra06 $ra06*.hzp /o <<
  60.         fi;if 6 90;era *.h?p;else;root:reg p6; $0;fi
  61.  
  62.     NOTES:    1. HUP3 has been placed on two lines for legibility
  63.            it should be placed on a single line prior to use.
  64.         2. If you only plan to use HUP (no editing), only HUP
  65.            and HUP3 need be transferred.
  66.         3. If MENU editing only is to be performed, all except
  67.            HUP1A should be copied.
  68.         4. If all .HZP files are to be edited, HUP1A should be
  69.            copied in lieu of HUP1.
  70.         5. For those who can finish the editing in a single
  71.            session - the name of your editor and HUP2 can be
  72.            added at the end of the HUP1 or HUP1A scripts to
  73.            permit the process to be continuous.  This option
  74.            is not recommended as it precludes extracting
  75.            files from more than one Z3HELP##.LBR before
  76.            editing.
  77.         6. For those who do not expect to have to extract from
  78.            more than one Z3HELP##.LBR at a time the $1 token
  79.            can be replaced with ??.  This will extract from
  80.            any Z#HELP##.LBR without typing the number on the
  81.            command line.  Do not have more than one Z3HELP##.LBR
  82.            in the source directory if you make this change.
  83.  
  84. HOW THEY WORK
  85. =============
  86.  
  87. The key to these scripts are the ASCII function added to ARUNZ by
  88. Jay Sage.  Basically HUP3 does all the work of marching thru the help
  89. libraries.  ZSYStem register 6 is seeded with 65 (ASCII A) and the
  90. script is invoked.
  91.  
  92.   HUP  The script operation is as follows:
  93.   ===
  94.   lex new:z3help$1 *.hzp    extracts all help files from the z3help
  95.                 file whose number was included in the
  96.                 command line without uncrunching them.
  97.   root:reg s6 'A'        seeds register 6 with A (ASCII 65)
  98.   hup3                calls HUP3 which does the work
  99.  
  100.   HUP1  The script operation is as follows:
  101.   ====
  102.   lex new:z3help$1 *.hzp /o    extracts all help files from the z3help
  103.                 file whose number was included in the
  104.                 command line without uncrunching them.
  105.                 NOTE: previous copies are overwritten
  106.                 allowing the extraction from more than
  107.                 one Z3HELP##.LBR prior to editing.
  108.   lex new:z3help$1 ?.hzp /uo    extracts the menu files with uncrunching
  109.                 and overwriting.
  110.   HUP2
  111.   ====
  112.   era *.bak            erase any backup (.BAK) files left by
  113.                 your editor to save space
  114.   crunch *.hlp /o        crunch all the edited files overwriting
  115.                 the crunched files from HUP1.
  116.   root:reg s6 65        initialize register 6 to `A' (65d)
  117.   hup3                call HUP3 to do the work.
  118.  
  119.   HUP3 
  120.   ====
  121.   The expanded script operation is as follows:
  122.  
  123.   fi                housekeeping - clears outstanding if
  124.   if ex A*.HZP            check for existence of any help file
  125.                   beginning with A
  126.   lput help:A A6*.hzp /o;fi    puts the files in the library and ends if
  127.   if 6 Z            checks if we have processed `Z'
  128.   era *.h?p            erases all working files if we have
  129.   else                option if we haven't reached the end
  130.   root;reg p6; $0        increments register 6 (next letter)
  131.                   and reinvokes the alias.
  132.   fi                end of the if-else (Note this is not
  133.                 seen if the alias is called by itself,
  134.                 therefore, the fi beginning the alias.
  135.  
  136. ACKNOWLEGEMENTS
  137. ===============
  138. There are many to thank for the creation of this alias from those
  139. who shared there alias scripts which educated us who follow, to Jay
  140. Sage, who added the ASCII format to ARUNZ and to Howard Goldstein
  141. for his judicious and timely use of the flit gun and to Bob Dean
  142. whose ZHLPSUBS prodded me to get this off the back burner.
  143.  
  144.                         Ed McGovern
  145.