|
Larry Ducie wrote: > > So, it would appear to be a balancing act - increased level of information > vs reduced program performance. In some circumstances it may be better to > code a PSDS in a program which uses only the first 80 bytes, and include > subfields past byte 80 only if specifically required - such as the job name > or user name. Of course, the performance hit is felt when the program is > initialised, so it is much less of an impact if the program is called > several times and returns with LR off, or if it is a long-running program. > It's just a case of getting the right balance. > Larry, there are only a few subfields that aren't available in the formatted dump. The dump routine fetches most of the information if it hasn't already been fetched during initialization. The job name and user name would be in the dump even if the PSDS wasn't long enough. The only subfields that wouldn't be available in the dump is the ones that are meaningless if not obtained during initialization (like the time the program started). Try running this program and reply 'D' to the divide-by-zero error, and then check the dump to see what's not available. C div zero zero 5 0 C seton lr But actually the performance hit for having a PSDS is pretty small. I don't think it wouldn't be noticeable unless you repeatedly call programs that do very little, AND set LR on every time. I would code a PSDS of whatever size I wanted, whenever I wanted, and not worry about *INIT performance. I just ran a little test. If I have program that has a couple of loops with 500,000 iterations, first calling a program with a PSDS that just sets on LR, and then calling a program without a PSDS that just sets on LR, then it takes about 20 times longer to do the has-PSDS loop (on my system, 79 seconds vs 4 seconds). I added an F spec for a printer file to the both programs, (adding an open and close of one file) and adjusted the number of loop iterations to 2000 (guessing correctly that it would take way longer to make the calls). The no-psds loop took 15 seconds and the has-psds loop took 16 seconds. Conclusion: don't worry about the time it takes to initialize the PSDS.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.