|
boothm@earth.goddard.edu wrote: > Don't you need to do a setll, > then do a read, > then do a compare to your key, > to see if the record you seek is actually there? > > Whereas, with a chain you need only hit the file's index to set on the > > no-hit indicator? > I think the intent of the questioner was to position the file for future read(s) (chain with no-hit vs. setll). IMO, in todays world of big iron, the answer is simple - code it the way that will make it the most readable. C KEY CHAINFILE 90 * C *IN90 IFEQ *ON .......etc. this makes it pretty obvious that the programmer has a complete key, and wants to know if "a particular" record exists or not. C PRTKEY SETLLFILE C PRTKEY READEFILE 90 * C *IN90 DOWEQ*OFF C............etc. This makes it obvious that the intent is to read a set of records, not just one. The days of saving a few nano seconds per cycle at the expense of readability are long over. The instructor should have answered that it doesn't make any difference which opcode he uses and that the program should be designed in such a way that you minimize ALL reads/sets/chains and that if it takes an analyst an extra hour to decifer bad code, this is much more expensive than the difference between setll/chain * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This is the Midrange System Mailing List! To submit a new message, * * send your mail to "MIDRANGE-L@midrange.com". To unsubscribe from * * this list send email to MAJORDOMO@midrange.com and specify * * 'unsubscribe MIDRANGE-L' in the body of your message. Questions * * should be directed to the list owner / operator: david@midrange.com * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
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.