Re: UNSTRING performance issue
- From: "Chris" <ctaliercio@xxxxxxxxx>
- Date: 29 Nov 2005 09:34:24 -0800
docdw...@xxxxxxxxx () wrote:
> In article <1133283853.139599.62380@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
> Chris <ctaliercio@xxxxxxxxx> wrote:
> >Sorry doc - trust me - this isn't homework. More like an old dog
> >looking for a new trick.
>
> Workwork can take the form of homework... I was using 'homework' in the
> sense of http://m-w.com/dictionary/homework, '3 : preparatory reading or
> research'. It was intended as a compliment.
>
Well - in that case, I thank you for the compliment! :)
> [snip]
>
> >To clarify, in my world, the nth field is the field following the
> >(n-1)th delimiter. So in your your example string:
> >
> >VAL1,,VAL2
> >
> >VAL2 is actually the 3rd field, with the 2nd field containing a "null"
> >value.
>
> Thanks for the clarification.
>
> >The only reason I posed this question is because I actually found a
> >source in my library where the original author has defined JUNK-x
> >fields in the WORKING-STORAGE section in order to "pad" his unstring
> >statements. Instead of looking for a better way to get to the 59th
> >value in a set, that person actually has declared JUNK-01 all the way
> >up to JUNK-58 (all as pic x(1) variables). The unstring statement is a
> >beast to behold, consuming over 60 lines, since he enumerates each
> >JUNK-XX field on its own line.
> >
> >
> >To my way of thinking, while the code works, this is not exactly "best
> >practice."
>
> Bingo... it works and nobody complains too much about the efficiency. It
> smells like it was coded for IKFCBL00, the IBM compiler for the '74
> Standard (sometimes referred to as OldBOL); inline PERFORMS were not
> available... but the STRING compiled down to some right nasty
> machine-code. That changed with IGYCRCTL, though.
>
This explanation makes sense given the context of the programs place in
the application. This is one of the oldest members of the library - no
dating to indicate exactly how old though.
> >In scenarios like this, I had always used code snips like
> >the one I posted here.
>
> A lot of other folks haven't done that... and a lot of other folks have
> been met with a single-line response of 'Please do your own homework.'
>
Agreed - nothing worse than showing no effort towards your own
resolution. Unless of course, the poster is truly clueless on where to
even begin. I trust that with your experience you can tell the
difference by now.
..
> >I was just wondering if this was going to garner
> >the optimal performance or if the original author knew something I did
> >not. So - I put the question out there for folks with more knowledge
> >than myself:
>
> ... and you wound up gettin my reply... ah well, worth double what I've
> asked to be paid for it.
>
And your reply actually gave me an explanation that makes sense, so I'd
say its worth considerably more than double.
> >
> >Thanks for the suggestion, and your code snip makes perfect sense.
>
> Breaking into the Holiday Cheer, are you... and at this hour of the day!
> Glad to have been of assistance.
>
I'd offer you some egg-nog, but we drank it all already ...
> [top-posting snipped]
>
> DD
Thanks Again,
Chris
.
- References:
- UNSTRING performance issue
- From: Chris
- Re: UNSTRING performance issue
- From:
- Re: UNSTRING performance issue
- From: Chris
- Re: UNSTRING performance issue
- From:
- UNSTRING performance issue
- Prev by Date: Re: UNSTRING performance issue
- Next by Date: Re: UNSTRING performance issue
- Previous by thread: Re: UNSTRING performance issue
- Next by thread: Re: UNSTRING performance issue
- Index(es):
Relevant Pages
|