I don't know what globbing is, but we have here an assembler
routine that does generalized wildcard comparison between a
field and a wildcard spec. The spec is built according to
the rules used by the LISTFILE command of CMS: * = zero or
more of any character, % = exactly one of any character.
We have used this routine as the basis of several tools,
and in one release of VM I even added it to the CMS nucleus
and called it from the NAMEFIND module, allowing wildcards
in the values supplied for tags. (Hmmm... it looks like
that is no longer possible. If I am seeing what I think I am,
NAMEFIND is now OCO. Sheesh... why???)
I looked at the source for Q DASD <volser>, and at first
glance it seems possible, and even not impractical, to add
an exit point to HCPQDC in the code after label VOCONT
(after the line with "CLC VOLID,RDEVSERO") to call the
the wildcard checking routine.
If the real volser would be found to match the pattern
supplied, the volser could then be accepted even though
CP did not find a strict match.
Unfortunately, I do not have time now to play with this,
much as my fingers itch to try it.
==== topic change ====
On another topic that is connected to this thread:
Just for neatness, when I write a pipe with a stage that
is not always needed, rather than duplicate the pipe as
was suggested by someone here, I prefer to put the
optional stage in a variable:
sortstage = ''
if SORTYN = 'Y'
then sortstage = '| sort 21.6 ascending'
'pipe cp query dasd',
'| locate /'VOLSER'/',
sortstage,
'| pad 35',
'| chop 35',
'| stem DASDX1.'
(I am not commenting on the pipe itself, just on the
duplication for the sort stage).
Shimon
---- Original message ----
>
>So ... to make 'q dasd' work the way David expresses, that
function
>would need to call some kind of globbing subfunction. Same
thing for
>'ifconfig' in Linux and Unix. We need normalized namespace
globbing,
>something which can be used by commands which don't
necessarily do
>files, commands which are part of non-Unix stuff (like the
CP Nuc).
>This stuff has been implemented in C time and again. Too
bad CP
>doesn't have a C runtime instantiated. Oh ... wait ... It
does! :-)