|
James, Your explanation makes sense... I guess there is no "best" practice when it comes to EXCEPT vs. UPDATE (or EXCPT vs UPDAT for you RPG III people) Like many things, it all depends on the circumstance. Regarding "searching for fields that begin with cu", I use a technique that might help you -- if you ever have to do a search like this... Go to the top of your source member in SEU and put XX on the first source statement, then down to the bottom, and put XX on the last statement, so all records are excluded. Do a "F CU A" on the command line at the top of SEU... or whatever you're searching for... SEU will now display all lines that contain the letters "CU", and nothing else. In many cases, you'd get better resuts if you search for ' CU' instead of just CU, but that might miss a few results.... at any rate, its not too hard to pick through the source member this way and see where things are being changed. Of course, if your fields, instead of starting with "CU" just start with "C", this technique won't work :) But, its still helpful in many circumstances Also, I'd like to point out that although you can search in specific positions in RPG III, this does make it possible to miss things, such as data structures... If you're looking for where a field is USED (not just CHANGED) this has even more problems, such as array indexes, parts of ":" delimited factors, such as SUBST, CAT, SCAN, etc. Of course, its much less likely to miss something that way in RPG III than it is in RPG IV :) "James W. Kilgore" <qappdsn@ibm.net> wrote: > > I do have to take exception with the EXCPT vs UPDAT. It's not an > issue of > right/wrong, but I would like to explain -why- we adopted an EXCPT > standard. > > Your example if IF, EVAL, EVAL, UPDAT is a nice and clear use. > Unfortunately > when I've got a 150 page program listing in front of me and see that > file is > processed for update, I flip to the last page and can see the fields > being > updated. Otherwise I have to go through the whole darn thing and, > well the last > guy probably wasn't as neat as you, I'll find EVAL/MOVE/Z-ADD on > pages 20, 38, > 51, 62, 73, 85, 91, 104, etc. > > Under RPGIII I could scan the first two positions of the result fiel > for CU or > whatever, but not any more! If I have a 200 field record being > UPDAT'd I have to > search for every field name to see what is being changed. :( +--- | This is the RPG/400 Mailing List! | To submit a new message, send your mail to RPG400-L@midrange.com. | To subscribe to this list send email to RPG400-L-SUB@midrange.com. | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com. | 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.