I agree with you, John. There has been many times that I've done exactly that and exactly for the reasons you state. If the need would have been something that could have been used in other situations then I would have used a subroutine this time. This need, though, was extremely narrow in scope and by keeping it as an I-desc formula, it was totally self contained, self documented, and is not in danger of, six months from now, having the calculations modified, potentially, inadvertently, changing the net results.
This group has so much deep knowledge that when I ask a question, I know that my thought processes are going to be either confirmed or expanded. Thanks to everyone for sharing your expertise. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Israel, John R. Sent: Friday, May 20, 2011 9:01 AM To: 'U2 Users List' Subject: Re: [U2] Multi char delimiter in DICT item It is for this pain in the butt type of situation that I often call a subroutine to do my work. I understand that part of the requirement was to try to avoid this, but I have had far too many situations where the I-Desc keeps getting more and more complicated to get the job done, only to find out that in the end, I need to do it with a subroutine any way. When this happens, I try to be pro-active enough to anticipate that I will want to expand upon it later (maybe do different types of manipulations for the same data). Thus, I pass the arguments that I know I need, plus several other that I do not need at them time, but can be used in the future as other uses or flavors are needed. A complicated I-Desc can often be written as a simple subroutine. Hours have been spent going back and forth on a solution to the original thread, where 10 minute would likely have solved it by a subroutine. Also, once the subroutine is written for the I-Desc, it can ALSO be called by normal program. Imagine that. 1 piece of code that consistently returns a desired calculation throughout the system. If a change is ever needed, fix it in the one subroutine, and it is solved everywhere. Unless it is a REALLY simple I-Desc, go with a subroutine. Just my 2 cents... John Israel Senior Programmer/Analyst Dayton Superior Corporation 1125 Byers Road Miamisburg, OHÂ 45342 -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Martin Phillips Sent: Friday, May 20, 2011 11:33 AM To: [email protected]; U2 Users List Subject: Re: [U2] Multi char delimiter in DICT item Hi David, > Bob is right. Lets enhance the FIELD function to accept a string > delimiter > and not just a single character. A nice idea but it has to be a new function because FIELD() is defined as using only the first character of the supplied delimiter. Because an enhancement such as this is unlikely to appear in time to resolve the original poster's problem, it should be possible to work around the issue by replacing all of the multi-character delimiters with some single character that would never appear in the data and then using FIELD() with this as the delimiter. I cannot remember whether Unidata supports CHANGE() in I-types. For some strange reason UniVerse does not. Martin Phillips Ladybridge Systems Ltd 17b Coldstream Lane, Hardingstone, Northampton NN4 6DB, England +44 (0)1604-709200 _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list [email protected] http://listserver.u2ug.org/mailman/listinfo/u2-users
