My REXX Programs
I have found these REXX routines to be useful, some more than others. Take
whatever appears useful. These were written for Quercus System's Personal
Rexx For Windows. Some are conversions to Rexx of programs by other people.
-
alsq.rexx
- Does a least squares fit. Based on a Fortran routine from Oak Ridge National
Lab.
- bbqsort.rex
- Bare-bones quick sort.
- buildhtm.rex
- Builds an HTML <DL> list of names of files in a directory to which I
add descriptive information. For example, it was used to create this list.
At this stage, additions must be manually inserted.
- checkhtm.rex
- Used with buildhtm.rex and extrahtm.rex
to check the format of the file filelist.htm.
- chekmult.rex
- Counts the number of times each blank-delimited word appears in a file. Faster than wcount.rex.
- chkcol.rex
- Checks tabular text files for consistent column boundaries. This is useful
when imported tabular text files into Excel or Access.
- combsort.rex
- Performs a sort using the COMBSORT method. I first saw this in Byte
magazine in Pascal. This is a relatively simple, relatively fast sort algorithm.
- combstem.rex
- Demonstrates how to use combsort.rex with the stem
specified externally.
- csort2.rex
- For sorting one array, and rearranging another array based on the order
of the first array. Uses the COMBSORT algorithm.
-
day.rex
- Given a date, returns the day of the week.
- easter.rex
- Calculates date of Easter for a given year. Formula came from a Navy website.
- extrahtm.rex
- Checks an HTML list of file names for files that no longer exist.
- fileck.rex
- Checks for new and missing files on drive C and additional drives.
- fit.rex
- Does a fit using the ALSQ routine.
- fixdate.rex
- Takes a date of form mm/dd/yy or mm/dd/yyyy and return a date of format 'S' which is like
yyyymmdd. For the mm/dd/yy format, the user may specify the breakpoint year to determine whether yy
should be added to 1900 or 2000.
- frmt.rex
- Calculates optimum placement of decimal point for constant field width
and calls the FORMAT function.
- getcsv.rex
- Processes a line of comma-separated values and stores the values into a
stem variable. Excel and Access can export .csv files.
- getword.rex
- Returns the blank-delimited word at a specific character position in a
string.
- heapsort.rex
- A REXX implementation of the heapsort technique, a relatively efficient
technique.
- howmany.rex
- Returns the count of the number of times a given character occurs in a
specified string.
- incstrng.rex
- "Increments" a given string using only characters from a specified string.
- lastword.rex
- Finds the last word in a set of blank-delimited words.
- lintrp.rex
- Can be used to linearly interpolate or extrapolate.
- mysqrt.rex
- A square root routine.
- omit.rex
- Removes the boxes from around each cell from a table exported as formatted
text from Access.
- prex.rex
- A REXX preprocessor. Allows file inclusion and substitutions to be made.
Is set up for MVS mainframe REXX, Personal REXX, or uni-REXX.
- randname.rex
- For generating a random name of a given length from a longer string.
- rlog.rex
- A natural log routine.
- roundoff.rex
- Rounds a number in the direction of smaller absolute value, using a specified increment size.
- roundup.rex
- Rounds a number in the direction of larger absolute value, using a specified increment size.
- suffix.rex
- For a specified integer, returns the integer with 'st','nd', or 'th' appended
to it. For example, 22 is returned as 22nd.
- wc.rex
- Counts lines, words, and characters (excluding CRLF) in a file. Also displays
the distribution of words per line.
- wcount.rex
- Counts occurrences of the blank-delimited words in a file using data structures
and recursion.
- weird.rex
- Calculates weird anniversaries -- 10000 hrs, a million minutes, etc.
- ylagrex.rex
- REXX version of Oak Ridge National Lab's YLAG -- Lagrangian interpolation.