I created this exec because I wanted the output of query names to be
sorted.  Plus I sometimes wanted to limit what I was seeing.  I works
for me.
 
SAY                                                         
SAY 'Date..' DATE() '     Time..' TIME('N')                 
Parse upper arg JOBNME                                      
If length(JOBNME) > 8 then                                  
  Do                                                        
  Say "Length of Job Name is greater then 8, please reenter"
  Parse Upper External JOBNME                               
  End                                                       
SAY                                                         
  'pipe cp query names',                                    
  '| split ,',                                              
  '| strip',                                                
  '| pad 18',                                               
  '| locate /'JOBNME'/',                                    
  '| sort 1.8 ascending',                                   
  '| join 3',                                               
  '| console'                                               

Paul Feller
AIT Mainframe Technical Support
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
(319)-355-7824 

 

________________________________

From: The IBM z/VM Operating System [mailto:[EMAIL PROTECTED] On
Behalf Of Lionel B. Dyck
Sent: Friday, July 27, 2007 1:22 PM
To: [email protected]
Subject: Re: pipe question



I like it - this pipe 'thingy' has lots of capability and lots for me to
learn. 

Thanks


________________________________

Lionel B. Dyck, Consultant/Specialist 
Enterprise Platform Services, Mainframe Engineering 
KP-IT Enterprise Engineering, Client and Platform Engineering Services
(CAPES) 
925-926-5332 (8-473-5332) | E-Mail: [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>  
AIM: lbdyck | Yahoo IM: lbdyck 
Kaiser Service Credo: "Our cause is health. Our passion is service.
We're here to make lives better." 

"Never attribute to malice what can be caused by miscommunication." 

NOTICE TO RECIPIENT: If you are not the intended recipient of this
e-mail, you are prohibited from sharing, copying, or otherwise using or
disclosing its contents. If you have received this e-mail in error,
please notify the sender immediately by reply e-mail and permanently
delete this e-mail and any attachments without reading, forwarding or
saving them. Thank you. 



RPN01 <[EMAIL PROTECTED]> 
Sent by: The IBM z/VM Operating System <[email protected]> 

07/27/2007 11:20 AM 
Please respond to
The IBM z/VM Operating System <[email protected]>


To
[email protected] 
cc
Subject
Re: pipe question

        




Find searches for things at the beginning of a record. Locate searches
anywhere within a record. Given that you didn't do a split to put the
userids on separate lines, I'd think that "pipe cms q n | locate /ESA/ |
console" would work better. 

Also, q n is a CP command, not a CMS, so actually, you'd want "cp q n"
as the first stage, just to avoid someone creating a "q" exec and
messing you up.

To really get down to the meat of it, you'd want to do something like:

"pipe cp q names | split at /,/ | strip leading blank | locate /ESA/ |
console"

Someone will argue that the strip should be after the locate for
efficiency sake, and that would be true for a huge list. For Q N, it
shouldn't be an issue.

-- 
  .~.    Robert P. Nix             Mayo Foundation 
 /V\    RO-OE-5-55              200 First Street SW 
/ ( ) \  507-284-0844           Rochester, MN 55905 
^^-^^   ----- 
"In theory, theory and practice are the same, but     "Join the story...
Ride Ural."
in practice, theory and practice are different." 


On 7/27/07 1:11 PM, "Lionel B. Dyck" <[EMAIL PROTECTED]> wrote:


I'm learning pipes in cms and am trying to issue a 'q n' command and
filter it to only display selected names. 

I'm trying this with no success - can someone educate me on what I'm
doing wrong: 

pipe cms q n | find ESA | console 


Reply via email to