home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rexxlb.zip / SAMPLES / SAMPLES.DOC < prev    next >
Text File  |  1994-09-01  |  7KB  |  167 lines

  1. REXXLIB for OS/2 - SAMPLES.DOC
  2. September 1, 1994
  3.  
  4. Here is a brief description of the sample REXX programs included in this
  5. directory. Most of these programs, such as TREED2, ENVED, and TRAVERSE,
  6. can be of immediate practical use. A few such as MENUS, are included as
  7. examples of coding techniques.
  8.  
  9. Try using the RXGREP.CMD program if you want to find which of these
  10. examples illustrate the use of any given REXXLIB function.
  11.  
  12. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ATTENTION !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  13.  
  14. Before you can run any REXX programs that use REXXLIB, you must register
  15. the functions with the operating system. The following statements placed
  16. in a REXX program will do this:
  17.  
  18.     call rxfuncadd 'rexxlibregister', 'rexxlib', 'rexxlibregister'
  19.     call rexxlibregister
  20.     call rxfuncadd 'w_register', 'rxwin30', 'rxwindow'
  21.     call w_register
  22.  
  23. Examples that use RXWINDOW do this registration themselves. However, the
  24. examples do NOT make calls to register REXXLIB functions. Instead of
  25. placing these statements in every program that uses REXXLIB, we
  26. recommend that you execute these from a REXX program that is run only
  27. once when the system is loaded. The easiest way to do this is with a
  28. STARTUP.CMD file. If you do not already have one, simply place the above
  29. lines in a file called STARTUP.CMD. Provide a REXX comment (/* ... */)
  30. as the first line of the file. And place the file in a directory listed
  31. in your path. STARTUP.CMD will then run every time the system is loaded,
  32. and all of the REXXLIB functions will be registered.
  33.  
  34. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  35.  
  36.  
  37. *** ANOTE.CMD
  38. ANOTE annotates a disk file using extended attributes. It calls a text
  39. editor in order to allow creation of notes that can be attached to a
  40. file. The information is stored in the extended attributes of the file.
  41. If annotations already exist, they are displayed in the editor.
  42.  
  43. *** ASC2PS.CMD
  44. ASC2PS prints an ASCII file on a Postscript printer.
  45.  
  46. *** ASCII.CMD
  47. ASCII displays a chart of ASCII characters.
  48.  
  49. *** BLAST.CMD
  50. BLAST deletes all files in a given directory and all its subdirectories,
  51. and deletes then deletes the directory and its subdirectories. It is
  52. capable of handling hidden, system, and read-only files.
  53.  
  54. *** CMPDIR.CMD
  55. CMPDIR compares the date & time of all files in one directory to that of
  56. corresponding files in another directory, and shows which files have
  57. earlier, later, or identical dates. The first argument may also include
  58. a file name with wildcards.
  59.  
  60. *** COPYEX.CMD
  61. COPYEX copies a group of files except for specified extensions. The
  62. extensions to be excluded are read from the keyboard.
  63.  
  64. *** DELCH.CMD
  65. DELCH computes the CRCs of two files that are being compared. The first
  66. file is deleted if the CRCs match.
  67.  
  68. *** EALIST.CMD
  69. EALIST displays all the extended attribute information for a specified
  70. file.
  71.  
  72. *** ENVED.CMD
  73. ENVED lets you edit your DOS environment variables. It displays the
  74. current contents of the environment variables, lets you make changes,
  75. and then updates your DOS environment. ENVED uses the RXWINDOW function
  76. package.
  77.  
  78. *** FINDEA.CMD
  79. FINDEA traverses a tree of directories, starting at specified directory,
  80. searching for all files that have extended attributes.
  81.  
  82. *** FL.CMD
  83. FL is a command shell that makes extensive use of RXWINDOW. It allows
  84. for listing files according to a number of selection criteria and
  85. selectively performing commands on a single file or group of files.
  86. It is a good illustration of a fairly large REXX application that
  87. involves user interface and keyboard handling.
  88.  
  89. *** LSDIR.CMD
  90. LSDIR shows directory structure, with file counts and space totals. It
  91. lists all subdirectories in a tree, together with the number of files
  92. each contains and the amount of disk space consumed by the files. If the
  93. directory has subdirectories, the cumulative totals for files and space
  94. in all subdirectories is also shown.
  95.  
  96. *** MENUS.CMD
  97. MENUS is an example of the use of the RXWINDOW function package to
  98. display and allow selection from dropdown menus.
  99.  
  100. *** PS4UP.CMD
  101. PS4UP prints an ASCII file on a Postscript printer with 4 pages per
  102. sheet of paper.
  103.  
  104. *** RXGREP.CMD
  105. RXGREP provides recursive file search using regular expressions. It
  106. searches a specified directory and all subdirectories for files which
  107. contain strings that match a regular expression pattern.
  108.  
  109. *** SAMPLFLD.CMD
  110. SAMPLFLD illustrates the usage of the W_GET and W_READ functions and
  111. creation of entry fields using RXWINDOW, including the ability to change
  112. field attributes and make protected and masked fields. See ENVED.CMD for
  113. a more useful example that uses entry fields.
  114.  
  115. *** SERVER.CMD
  116. SERVER is a sample named pipe server using REXXLIB functions. It simply
  117. echoes whatever message is sent to it.
  118.  
  119. *** SWLIST.CMD
  120.  
  121. SWLIST demonstrates the use of the DOSSWITCHLIST function to obtain
  122. information about active sessions. Titles, process ids, session ids,
  123. window handles, and program types are listed for each active session.
  124.  
  125. *** SYNCH.CMD
  126. SYNCH gets two directory trees in synch. It compares two directories, an
  127. "old" version and a "new" version. All files that are newer in the new
  128. directory are copied to the old directory, as are files that don't exist
  129. in the old directory. All files in the old directory that do not exist
  130. in the new directory are deleted. If a file in the old directory is
  131. newer than the file of the same name in the new directory, a
  132. synchronization error is detected, and no changes are made. The result
  133. is that unless there is an error, the two directories have the same
  134. contents. SYNCH loops recursively through all subdirectories of the old
  135. directory.
  136.  
  137. *** TRAVERSE.CMD
  138. Traverses a directory tree, starting at the current directory, issuing
  139. a specified command in each directory. For example,
  140.     traverse erase *.bak
  141. will erase all .BAK files in the current directory and all of its
  142. subdirectories.
  143.  
  144. *** TREED.CMD
  145. Diagrams the tree structure of a disk with subdirectories. By default it
  146. starts at the root directory of the current drive, but you can specify
  147. the directory to start with as a parameter.
  148.  
  149. *** TREED2.CMD
  150. This is a more sophisticated version of TREED.CMD. It uses the RXWINDOW
  151. function package to display the tree structure in a window, and lets you
  152. change directories and move around in the directory structure. By
  153. default it starts at the root directory of the current drive, but you
  154. can specify the directory to start with as a parameter.
  155.  
  156. *** TRYRXWIN.CMD
  157. TRYRXWIN lets you interactively experiment with the functions in the
  158. RXWINDOW package. It prompts you for the functions and parameters you
  159. want to try, and then calls the specified functions. When TRYRXWIN is
  160. invoked, it displays instructions on how to use it.
  161.  
  162. *** UPDIR.CMD
  163. UPDIR updates a target directory from a given source directory. All
  164. files in the target directory are compared to files of the same name
  165. in the source directory. If they are older, they are replaced by the
  166. newer file from the source directory. No other changes are made.
  167.