home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / MAKEREXX.ZIP / makerexx.hlp < prev   
Text File  |  1992-10-13  |  6KB  |  129 lines

  1. MAKEREXX.DOC - Documentation on the use of MAKEREXX
  2.  
  3. One of the limits of REXX in MVS, VM, or OS/2 is that there are no
  4. provisions to copy common code from a source code library for inclusion
  5. in other REXX routines.  A lot of REXX programmers use the 'CUT & PASTE'
  6. method and never graduate to copybook inclusion methods.  MAKEREXX is
  7. a utility that allows a REXX programmer to create a library of generic
  8. routines.  Those routines are maintained in a subdirectory named 'XXX'
  9. and must have a file suffix of '.XXX'.  The REXX code produced by
  10. MAKEREXX is placed in a subdirectory of '.CMD' and will have a suffix
  11. of either '.CMD' or '.ERX'.  '.CMD' files are OS/2 REXX routines while
  12. the '.ERX' files are EPM editor REXX routines.  Mainline REXX routines
  13. are maintained in a subdirectory named 'REX' and must have a file
  14. suffix of either '.REX' or '.EPM'.  '.REX' routines will be expanded
  15. into '.CMD' routines while '.EPM' routines will be expanded into '.ERX'
  16. routines.
  17.  
  18. Another way to visualize this is to look at the installation procedure:
  19.   1) Create a directory for an application, job, or system.
  20.   2) Switch to the new directory (example here is 'JOBX').
  21.   3) Run MAKEINIT.CMD which will perform the following:
  22.      a) Creates the subdirectories 'XXX', 'REX', and 'CMD'
  23.     with the following structures:
  24.  
  25.       JOBX          (containes control file 'MAKEREXX.INI')
  26.          |______ XXX  (for '.XXX' copybooks)
  27.          |______ REX  (for '.REX' and '.EPM' mainline routines)
  28.          |______ CMD  (for '.CMD' and '.ERX' expanded routines)
  29.  
  30.      b) Initilizes the 'MAKEREXX.INI' by running 'MAKEREXX' with
  31.     the argument of 'INIT'.
  32.  
  33. To use the utility to make OS/2 REXX routines, place any generic
  34. routines in the 'XXX' subdirectory with a filename suffix of '.XXX'.
  35. Place mainline routines in the subdirectory 'REX' with a filename
  36. suffix of '.REX'.  The way to signify that a routine is to be copied
  37. into another routine is to place the following line in the REXX code:
  38.  
  39. ++COPY filename.XXX (( options - notes
  40. |      |           |     |
  41. |      |           |     |__ User notes
  42. |      |           |__ MAKEREXX expansion options
  43. |      |__ Filename of the file to be copied
  44. |__ Keyword, must be in position 1
  45.  
  46. Extra spaces are allowed prior to and after filename paramater.  The
  47. filename must end with '.XXX'.  Although I have not tested it, the
  48. coding in MAKEREXX.CMD should allow for OS/2 filename conventions
  49. which include additional '.' characters or spaces.  If you decide to
  50. use OS/2 extended filename conventions, let me know of any problems
  51. you encounter any problems.  Currently, the options paramater is not
  52. implimented in this version.  As I am really rewritting a routine I
  53. have used under VM, I left this paramater in as it became very usefull
  54. for many different uses in the VM environment.    The notes parameter
  55. is not processed but is there to allow for comments or other notes by
  56. the programmer.
  57.  
  58. To expand a member, switch to the 'JOBX' directory and enter the
  59. following command:
  60.  
  61. MAKEREXX filename.REX '((' options
  62.      |           |
  63.      |           |__ MAKEREXX expansion options
  64.      |__ Filename of the file to be expanded
  65.  
  66. Extra spaces are allowed prior to and after filename paramater.  The
  67. filename should end with '.REX' or '.EPM'.  Although I have not tested it,
  68. the coding in MAKEREXX.CMD should allow for OS/2 filename conventions
  69. which include additional '.' characters or spaces.  If you decide to
  70. use OS/2 extended filename conventions, let me know of any problems
  71. you encounter any problems.  Currently, the options paramater is not
  72. implimented in this version.  The expanded member will be placed in
  73. the 'CMD' subdirectory.
  74.  
  75. The expanded member has some additional data inserted into the routine
  76. to be used for debuging and tracking of routine expansions. As each
  77. routine is read from disk, including the mainline routine, a line is
  78. inserted (as a REXX comment) containing the date and timestamp of the
  79. file, the size of the file, and the full pathname of the file being
  80. copied.  The expanded member contains a line prefix that containes
  81. the copylevel of the member.  The mainline routine is considered as
  82. level '0'.  The '++COPY' line is also converted to a REXX comment
  83. line.  The following is an example of: 1) File Information Line,
  84. 2) A regular REXX line after copy, 3) A converted '++COPY' line,
  85. and 4) a file information line for a copied line.
  86.  
  87. /*.I0.*/ /* 10-11-92  14:13:30 32 C:\MAKEREXX\REX\INCTEST.REX */
  88. /*.C0.*/ filefullname = filename'.'filetype
  89. /*.F0.*/ /* ++COPY inc1.xxx */
  90. /*.I1.*/ /* 10-11-92  21:19:44 95 C:\MAKEREXX\XXX\INC1.XXX */
  91.  
  92. One of the options I plan for an updated version would allow for the
  93. expansion to not insert the line prefix.  Until that time, they can
  94. be removed using the supplied routine 'MAKECLEN.CMD' that strips out
  95. the line prefix and any 'I' or 'F' cards.  The new file has a suffix
  96. of '.CLN'.  You will have to do any file renames.
  97.  
  98. To provide for automatic updating of all command files using a
  99. copybook, each routine must be 'registered' to the 'MAKEREXX.INI'
  100. by using the MAKEREXX routine with a filename ending with '.XXX'
  101. at first use and by registering it at changed whenever it is
  102. modified.  Registering a routine automaticlly flags any mainline
  103. routines that use the copybook are flaged as needing expansion to
  104. use new code.  To expand all flaged mainline routines, run MAKEREXX
  105. with the paramater of 'MAKE'.  To reinitilize the 'MAKEREXX.INI' file,
  106. then run MAKEREXX with a paramater of 'INIT'.
  107.  
  108. MAKEREXX must always be run with the 'JOBX' subdirectory as the current
  109. subdirectory.  It expects the 'MAKEREXX.INI' file to be available in
  110. the current subdirectory.  No OS/2 system files, '.INI' or otherwize
  111. will be updated by MAKEREXX.
  112.  
  113. At this time, there is no procedure to share '.XXX' files between
  114. seperate job directories.  I plan for this in a future update.
  115.  
  116. Now for the disclaimers.
  117.  
  118. I do not release this into the public domain.  I retain all rights to
  119. this code.  At this time, you may freely distribute this as long as
  120. it is distributed in its original format and without any modifications.
  121. If anyone wants to make a freewill donation because you use this code
  122. alot, I will not return it to you.
  123.  
  124. Tony Thigpen
  125. 115 West York Court
  126. Longwood, FL 32779
  127. (407)682-6544
  128.  
  129.