home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 18 REXX
/
18-REXX.zip
/
MAKEREXX.ZIP
/
makerexx.hlp
< prev
Wrap
Text File
|
1992-10-13
|
6KB
|
129 lines
MAKEREXX.DOC - Documentation on the use of MAKEREXX
One of the limits of REXX in MVS, VM, or OS/2 is that there are no
provisions to copy common code from a source code library for inclusion
in other REXX routines. A lot of REXX programmers use the 'CUT & PASTE'
method and never graduate to copybook inclusion methods. MAKEREXX is
a utility that allows a REXX programmer to create a library of generic
routines. Those routines are maintained in a subdirectory named 'XXX'
and must have a file suffix of '.XXX'. The REXX code produced by
MAKEREXX is placed in a subdirectory of '.CMD' and will have a suffix
of either '.CMD' or '.ERX'. '.CMD' files are OS/2 REXX routines while
the '.ERX' files are EPM editor REXX routines. Mainline REXX routines
are maintained in a subdirectory named 'REX' and must have a file
suffix of either '.REX' or '.EPM'. '.REX' routines will be expanded
into '.CMD' routines while '.EPM' routines will be expanded into '.ERX'
routines.
Another way to visualize this is to look at the installation procedure:
1) Create a directory for an application, job, or system.
2) Switch to the new directory (example here is 'JOBX').
3) Run MAKEINIT.CMD which will perform the following:
a) Creates the subdirectories 'XXX', 'REX', and 'CMD'
with the following structures:
JOBX (containes control file 'MAKEREXX.INI')
|______ XXX (for '.XXX' copybooks)
|______ REX (for '.REX' and '.EPM' mainline routines)
|______ CMD (for '.CMD' and '.ERX' expanded routines)
b) Initilizes the 'MAKEREXX.INI' by running 'MAKEREXX' with
the argument of 'INIT'.
To use the utility to make OS/2 REXX routines, place any generic
routines in the 'XXX' subdirectory with a filename suffix of '.XXX'.
Place mainline routines in the subdirectory 'REX' with a filename
suffix of '.REX'. The way to signify that a routine is to be copied
into another routine is to place the following line in the REXX code:
++COPY filename.XXX (( options - notes
| | | |
| | | |__ User notes
| | |__ MAKEREXX expansion options
| |__ Filename of the file to be copied
|__ Keyword, must be in position 1
Extra spaces are allowed prior to and after filename paramater. The
filename must end with '.XXX'. Although I have not tested it, the
coding in MAKEREXX.CMD should allow for OS/2 filename conventions
which include additional '.' characters or spaces. If you decide to
use OS/2 extended filename conventions, let me know of any problems
you encounter any problems. Currently, the options paramater is not
implimented in this version. As I am really rewritting a routine I
have used under VM, I left this paramater in as it became very usefull
for many different uses in the VM environment. The notes parameter
is not processed but is there to allow for comments or other notes by
the programmer.
To expand a member, switch to the 'JOBX' directory and enter the
following command:
MAKEREXX filename.REX '((' options
| |
| |__ MAKEREXX expansion options
|__ Filename of the file to be expanded
Extra spaces are allowed prior to and after filename paramater. The
filename should end with '.REX' or '.EPM'. Although I have not tested it,
the coding in MAKEREXX.CMD should allow for OS/2 filename conventions
which include additional '.' characters or spaces. If you decide to
use OS/2 extended filename conventions, let me know of any problems
you encounter any problems. Currently, the options paramater is not
implimented in this version. The expanded member will be placed in
the 'CMD' subdirectory.
The expanded member has some additional data inserted into the routine
to be used for debuging and tracking of routine expansions. As each
routine is read from disk, including the mainline routine, a line is
inserted (as a REXX comment) containing the date and timestamp of the
file, the size of the file, and the full pathname of the file being
copied. The expanded member contains a line prefix that containes
the copylevel of the member. The mainline routine is considered as
level '0'. The '++COPY' line is also converted to a REXX comment
line. The following is an example of: 1) File Information Line,
2) A regular REXX line after copy, 3) A converted '++COPY' line,
and 4) a file information line for a copied line.
/*.I0.*/ /* 10-11-92 14:13:30 32 C:\MAKEREXX\REX\INCTEST.REX */
/*.C0.*/ filefullname = filename'.'filetype
/*.F0.*/ /* ++COPY inc1.xxx */
/*.I1.*/ /* 10-11-92 21:19:44 95 C:\MAKEREXX\XXX\INC1.XXX */
One of the options I plan for an updated version would allow for the
expansion to not insert the line prefix. Until that time, they can
be removed using the supplied routine 'MAKECLEN.CMD' that strips out
the line prefix and any 'I' or 'F' cards. The new file has a suffix
of '.CLN'. You will have to do any file renames.
To provide for automatic updating of all command files using a
copybook, each routine must be 'registered' to the 'MAKEREXX.INI'
by using the MAKEREXX routine with a filename ending with '.XXX'
at first use and by registering it at changed whenever it is
modified. Registering a routine automaticlly flags any mainline
routines that use the copybook are flaged as needing expansion to
use new code. To expand all flaged mainline routines, run MAKEREXX
with the paramater of 'MAKE'. To reinitilize the 'MAKEREXX.INI' file,
then run MAKEREXX with a paramater of 'INIT'.
MAKEREXX must always be run with the 'JOBX' subdirectory as the current
subdirectory. It expects the 'MAKEREXX.INI' file to be available in
the current subdirectory. No OS/2 system files, '.INI' or otherwize
will be updated by MAKEREXX.
At this time, there is no procedure to share '.XXX' files between
seperate job directories. I plan for this in a future update.
Now for the disclaimers.
I do not release this into the public domain. I retain all rights to
this code. At this time, you may freely distribute this as long as
it is distributed in its original format and without any modifications.
If anyone wants to make a freewill donation because you use this code
alot, I will not return it to you.
Tony Thigpen
115 West York Court
Longwood, FL 32779
(407)682-6544