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 >
Wrap
OS/2 REXX Batch file
|
1992-05-25
|
6KB
|
145 lines
HUP - Help UPdate alias
=======================
By: Ed McGovern
Revision History
----------------
Rev 0 Apr 8, 1990 Original Release
GENERAL
=======
This group of scripts, when added to your ALIAS.CMD file will allow
the files to be extracted from Bill Tishey's Z3HELP##.LBR's and added
to the individual [ALPHA].LBR files. Three methods of operation are
supported. They are:
1. Extraction and insertion without editing [HUP]
2. Extraction and editing of Menu files before insertion [HUP1]
3. Extraction and editing of All files before insertion [HUP1A]
The Aliases are invoked by typing "HUP ##","HUP 1 ##", or
"HUP 1A ##", where ## is the number of the help library to be added
to the help system. For those who use HUP1 or HUP1A, HUP2 must be
invoked after editing is complete. (See NOTE 5 under the scripts).
The scripts are based on the setup of my system which is included to
ease modification for your system. I normally am logged into a clean
user area (work) which contains no files, this area should be 2 times
the size of the Z3HELP##.LBR if using HUP and 3 to 4 times if using
HU1 or HUP1A. The user areas referred to in the scripts are:
HELP: User area where all the [ALPHA].LBR files are located
NEW: A subdirectory to which I download all new files
ROOT: The area containing all user files. This is only
referenced with the REG command because for some
unrecalled reason, I have both the intrinsic and
external (REG.COM) available.
To use these scripts the following programs should be available on the
path in addition to COMMAND.COM (ARUNZ) and ALIAS.COM:
CRUNCH.COM latest version
LBREXT.COM renamed to LEX (NOTE use Vers 3.0 or later)
LPUT.COM latest version
REG.COM latest version
If you have any difficulty in using these scripts, or any suggestions
for improvement - please leave me a message on Jay Sage's Z-NODE 3 or
on GENIE to Ed-MCGOVERN or call (516) 224-5935 after 6pm or weekends.
THE SCRIPTS THEMSELVES:
=======================
HUP lex new:z3help$1 *.hzp;root:reg s6 65; hup3
HUP1 lex new:z3help$1 *.hzp /o;lex new:z3help$1 ?.hzp /uo
HUP1A lex new:z3help$1 *.hzp /uo
HUP2 era *.bak;crunch *.hlp /o ;root:reg s6 65; hup3
HUP3 fi;if ex $ra06*.hzp;lput help:$ra06 $ra06*.hzp /o <<
fi;if 6 90;era *.h?p;else;root:reg p6; $0;fi
NOTES: 1. HUP3 has been placed on two lines for legibility
it should be placed on a single line prior to use.
2. If you only plan to use HUP (no editing), only HUP
and HUP3 need be transferred.
3. If MENU editing only is to be performed, all except
HUP1A should be copied.
4. If all .HZP files are to be edited, HUP1A should be
copied in lieu of HUP1.
5. For those who can finish the editing in a single
session - the name of your editor and HUP2 can be
added at the end of the HUP1 or HUP1A scripts to
permit the process to be continuous. This option
is not recommended as it precludes extracting
files from more than one Z3HELP##.LBR before
editing.
6. For those who do not expect to have to extract from
more than one Z3HELP##.LBR at a time the $1 token
can be replaced with ??. This will extract from
any Z#HELP##.LBR without typing the number on the
command line. Do not have more than one Z3HELP##.LBR
in the source directory if you make this change.
HOW THEY WORK
=============
The key to these scripts are the ASCII function added to ARUNZ by
Jay Sage. Basically HUP3 does all the work of marching thru the help
libraries. ZSYStem register 6 is seeded with 65 (ASCII A) and the
script is invoked.
HUP The script operation is as follows:
===
lex new:z3help$1 *.hzp extracts all help files from the z3help
file whose number was included in the
command line without uncrunching them.
root:reg s6 'A' seeds register 6 with A (ASCII 65)
hup3 calls HUP3 which does the work
HUP1 The script operation is as follows:
====
lex new:z3help$1 *.hzp /o extracts all help files from the z3help
file whose number was included in the
command line without uncrunching them.
NOTE: previous copies are overwritten
allowing the extraction from more than
one Z3HELP##.LBR prior to editing.
lex new:z3help$1 ?.hzp /uo extracts the menu files with uncrunching
and overwriting.
HUP2
====
era *.bak erase any backup (.BAK) files left by
your editor to save space
crunch *.hlp /o crunch all the edited files overwriting
the crunched files from HUP1.
root:reg s6 65 initialize register 6 to `A' (65d)
hup3 call HUP3 to do the work.
HUP3
====
The expanded script operation is as follows:
fi housekeeping - clears outstanding if
if ex A*.HZP check for existence of any help file
beginning with A
lput help:A A6*.hzp /o;fi puts the files in the library and ends if
if 6 Z checks if we have processed `Z'
era *.h?p erases all working files if we have
else option if we haven't reached the end
root;reg p6; $0 increments register 6 (next letter)
and reinvokes the alias.
fi end of the if-else (Note this is not
seen if the alias is called by itself,
therefore, the fi beginning the alias.
ACKNOWLEGEMENTS
===============
There are many to thank for the creation of this alias from those
who shared there alias scripts which educated us who follow, to Jay
Sage, who added the ASCII format to ARUNZ and to Howard Goldstein
for his judicious and timely use of the flit gun and to Bob Dean
whose ZHLPSUBS prodded me to get this off the back burner.
Ed McGovern