Re: string manipulation in SPL
Posted in 1994
> A new topic for me. Any pointers? > > LET txt_strg = txt_strg || varaible4 > > I cannot seem to clip. I keep getting the full 255 characters in txt_strg > which makes appending the second variable moot. I've considered writing a > sub procedure, but if it always returns 255 characters, whats the point. I > also don't seem to be able to subscript. TFM is of course a great help. That's because whoever designed the language didn't believe that a clipped function is either necessary or desirable. It seems quite clear that text manipulation was mostly excluded from consideration in the design of SPL which is why it doesn't allow variable subscripts either. We have had both these in as a feature request from the moment we started playing with SPL back with 5.00.UC1. In fact the only feature request for SPL, that I'm aware of, that has been acted on is the requirement for the SQLCA structure to be made available. This became available with V6. If you have the option you may find using varchar attributes helps. This seems to only work the first time as after you have || one item to the varchar it fills the internal variable with spaces and a second || adds beyond the end of the field. There is no workaround with character fields unless you code for each character individually. I had to do this for international postcode manipulation. It's horrible. Thankfully I only had to deal with 6 character positions and I think that is about as far as you can take this approach. Cheers - Jim My opinions are my own. They may vary with time but they remain MINE! ---------------------------------------------------------------------- Name: Jim Gordon Company: DHL Systems Inc, Burlingame, CA, USA ----------------------------------------------------------------------