-------------------<snip>-------------------
I've been thinking this over for a while and have coded it up several
ways (they all seem to be about the same amount of CPU time in the small
tests) and I'm still wondering about the overhead of the various
processes. I have a feature that allows the user to enter options that I
will perform for various JOBNAME/TASKNAMEs, and I would like to be able
to provide the ability to use generic name processing for the JOB/TASK
names like:
ABC%%%G and ABC*, etc.
I sort the names internally, then process them sequentially, (I use
logic to limit the processing pretty well), but I keep thinking that
there must be a better/more efficient way to do this. I control the sort
(I wrote my own), and that's another thing, I keep flip/flopping on
whether or not the % and * should be first or last in the search
sequence, there seem to be advantages both ways. I want to be sure that
I always use the more specific name first, but I don't want to do too
much processing either. I figured that I would allow for no more than
1,000 entries, (any more than that and they better be thinking of using
more generics anyway:), but I can see that at some point I might want to
expand it to more entries), so even if I ended up doing it
inefficiently, I don't think that the overhead would be noticed, but it
still bothers me.
So to end my agony of this, (and I'm probably thinking about it too
much), I wanted to ask if anyone had any suggestions on what they
thought might be the best approach.
------------------------<unsnip>------------------------
In RACF sorts, the generic names usually follow the more specific names.
RACF treats the '&' as x'FE' and the '*' as x'FF' for sorting purposes.
You might try the same; a simple translate on each name will set it up
and you can use the same translate table to go the other way after the sort.
HTH........ Rick
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html