 |
 |
Current group: bit.listserv.tsorexx
Re: Efficiency or lack thereof
|
|
 | | From: | Ryerse, Robin | | Subject: | Re: Efficiency or lack thereof | | Date: | 18 Jan 2005 13:41:14 -0800 |
|
|
 | Bob; My original posting failed to emphasize the wide spread (re)use of the homegrown function package. The function package means a lot of code gets executed by a single statement.
Citing your recent situation, I recognize the efficiency of SORT. I also appreciate the ability of Rexx to easily parse and restructure data. To exploit both, my Rexx function package includes a direct interface to SORT. This allows me to use SORT to read data records into Rexx stems and/or sort Rexx stems into data records. The interfaces supports all SORT control statements. So, if I were given your task, it would be one rexx exec for everything including re-use of another exec (function) that allows the caller to define which FTP errors are worthy of abort. The end result would be more efficient than the original because after the FTP is complete, the data should goe through only 3 process: READ, manipulate, WRITE.
-----Original Message----- From: TSO REXX Discussion List [mailto:TSO-REXX@VM.MARIST.EDU]On Behalf Of Bob Bridges Sent: Tuesday, January 18, 2005 2:36 PM To: TSO-REXX@VM.MARIST.EDU Subject: Efficiency or lack thereof
Robin, this probably isn't what you had in mind but I'll add this one point: I was hired on this contract to automate a lot of random things and also a couple specific processes. The latter are pretty long and are in production so it'll take a lot of planning, but I just had occasion to replace five or six production steps with a single SORT and a REXX. The original five steps went something like this:
a) Check to be sure a certain FTP arrived as promised. If it did, complete the following steps: b) QUIKJOB to convert all lower-case letters to upper case. c) SORT to INCLUDE a portion of the records from step b), sort on SSN and write out a new format to file C. d) SORT to OMIT some records from step b), sort on SSN and write out a new format to file D. e) QUICKJOB to convert a location code in file d) to a description.
I think that's it. You can see that the original author likes SORT, and with good reason. But the replacement consisted of a single SORT on SSN and a REXX that did all the other stuff in a single pass.
I like the simplicity, but a SORT-loving colleague checked the stats on the new JCL and believes my two steps took about a CPU second longer to run than the five original steps. I like interpreted languages, I really do, and REXX is better than many for speed as well as being truly excellent at string processing. But I infer it can't stand up to SORT for efficiency.
--- Bob Bridges, robertbridges@discoverfinancial.com, 224 405-0811 rhbridg@attglobal.net, 847 520-1684 xt 243
/* Science is a differential equation. Religion is a boundary condition. -Alan Turing, quoted in J D Barrow's _Theories of Everything_ */
"Ryerse, Robin" 2005-01-18 13:14
To: TSO-REXX@VM.MARIST.EDU cc: Subject: Re: massive boilerplate inclusions (was : functions returning bo olean .... or failing ...)
The topic of this thread lead me to research some stats about the execs I have written. Currently, I have exactlty 100 execs that are available for general use within the lpar. The largest exec is 724 lines of code. The total lines of code for the 100 execs is 8443; makes the average around 85 lines of code. Obviously no "massive boilerplate"s. I should point out that the stats do not include the code for the function package which exclusively Assembler.
I know there are those who prefer using the boiler plate strategy to ensure completeness of error checking. But I do not subscribe to that approach. I get no complaints about completeness or accuracy of the delivered functionality.
As a discuusion point, I think the alternative to "boilerplate" should be considered.
---------------------------------------------------------------------- For TSO-REXX subscribe / signoff / archive access instructions, send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
---------------------------------------------------------------------- For TSO-REXX subscribe / signoff / archive access instructions, send email to LISTSERV@VM.MARIST.EDU with the message: INFO TSO-REXX
|
|
|
| | |
|
 |