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

Reply via email to