This is likely more a philosophical question. I am writing a CGI in
REXX. One thing this program needs to do is read a number of files in a
specific subdirectory. My current approach is to use "pure" REXX code to
do this. This means reading the entire directory (using "address syscall
readdir") to get a list of the files in the subdirectory into a stem
variable. I am then using an "address syscall readfile" in a loop to
read the contents of the each file. Each file has a single record in it.
I am then searching the second field in that record to see if it
contains a specific string, entered by the user via a Web page. The
fields in each record are separated by tab ('05'x) characters.
Altogether, omitting the error checking, this takes about 15 lines of
REXX code.

However, I have alternate method. The REXX program uses BPXWUNIX to run
an "awk" program to do the search. The "awk" program is only 4 lines
long. The plus of this is that it is much shorter. The minuses are that:
(1) it uses BPXWUNIX to fork/exec an awk program; (2) it uses "awk"
which nobody else on my team is familiar with.

So, should I go with the longer pure REXX program which is possibly more
understandable? Or should I go with the REXX/awk hybrid which is, in
some ways, simpler but has more overhead?

This is likely going to be a low use program.

--
John McKown
Senior Systems Programmer
HealthMarkets
Keeping the Promise of Affordable Coverage
Administrative Services Group
Information Technology

The information contained in this e-mail message may be privileged
and/or confidential.  It is for intended addressee(s) only.  If you are
not the intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication is
strictly prohibited and could, in certain circumstances, be a criminal
offense.  If you have received this e-mail in error, please notify the
sender by reply and delete this message without copying or disclosing
it. 

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to