| View previous topic :: View next topic   | 
	
	
	
		| Author | 
		Message | 
	
	
		vallishar Beginner
  
  Joined: 17 Dec 2002 Posts: 53 Topics: 14 Location: BengaLuru
  | 
		
			
				 Posted: Mon Mar 10, 2003 5:15 pm    Post subject: searching a member in pds | 
				     | 
			 
			
				
  | 
			 
			
				Hello,
 
 
Can anybody suggest a means of finding a member in set of datasets when the High Level Qualifier is known?  
 
 
For example, if there is a member MEM1 in one or many of the datasets of the pattern, HLQ1.*.*. How to locate the exact dataset ? 
 
 
Regards, _________________ If you're not failing every now and again, it's a sign you're not doing anything very innovative. | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		Mervyn Moderator
  
  Joined: 02 Dec 2002 Posts: 415 Topics: 6 Location: Hove, England
  | 
		 | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		patnekar Beginner
 
  Joined: 27 Jan 2003 Posts: 41 Topics: 16
 
  | 
		
			
				 Posted: Fri Mar 21, 2003 4:32 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				Hi,
 
   What you can do is this
 
 
1. In 3.4 give the names of your high level qualifier say TEST.*
 
2. This will list out all the PDS starting with TEST.
 
3. Now in ur command prompt type MEMBER 'MEMBER NAME u want'
 
4. The PDSs which have this member will have a displayed 'MEMBER' against them.
 
 
 Hope this helps
 
 
 Cheers!!
 
 Puru | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		CaptBill Beginner
 
  Joined: 02 Dec 2002 Posts: 100 Topics: 2 Location: Pasadena, California, USA
  | 
		
			
				 Posted: Fri Mar 21, 2003 5:40 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				patnekar,
 
 
That is slick!  Thanks.   I'm green with envy. | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		Dibakar Advanced
  
  Joined: 02 Dec 2002 Posts: 702 Topics: 64 Location: USA
  | 
		
			
				 Posted: Mon Mar 24, 2003 2:11 am    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				Puru,
 
 
I got 'INVALID COMMAND' when I tried member command.
 
 
Diba. | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		semigeezer Supermod
 
  Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
  | 
		
			
				 Posted: Mon Mar 24, 2003 2:40 am    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				| MEMBER was introduced in z/OS 1.2.  The FINDMEM exec does basically the same thing. | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		Dibakar Advanced
  
  Joined: 02 Dec 2002 Posts: 702 Topics: 64 Location: USA
  | 
		
			
				 Posted: Mon Mar 24, 2003 6:13 am    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				Thanks semigeezer,
 
 
But, my bad luck, even FINDMEM is not working. | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		dorkhead Beginner
 
  Joined: 07 Jan 2003 Posts: 25 Topics: 0 Location: Lux
  | 
		
			
				 Posted: Wed Mar 26, 2003 12:29 pm    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				diba, 
 
 
could u post the msg u got ? _________________   Dorkhead   | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		Dibakar Advanced
  
  Joined: 02 Dec 2002 Posts: 702 Topics: 64 Location: USA
  | 
		
			
				 Posted: Thu Mar 27, 2003 2:09 am    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				Hi Dorkhead,
 
 
These are the messages I am getting
 
 
Command ===> MEMBER 'STACK'
 
Message: Invalid command
 
 
Command ===> tso findmem STACK 
 
Message: IKJ56500I COMMAND FINDMEM NOT FOUND
 
 
Thanks,
 
Diba. | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		Dibakar Advanced
  
  Joined: 02 Dec 2002 Posts: 702 Topics: 64 Location: USA
  | 
		
			
				 Posted: Thu Mar 27, 2003 2:35 am    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				Sorry,
 
 
I didn't read completely the link 'FINDMEM Exec' provided by semigeezer. I thought it is some TSO command and tried it without writing the exec. 
 
 
Diba. | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		kane Beginner
 
  Joined: 02 Apr 2003 Posts: 1 Topics: 0
 
  | 
		
			
				 Posted: Wed Apr 02, 2003 8:44 am    Post subject:  | 
				     | 
			 
			
				
  | 
			 
			
				How about another way to do the same - 
 
 
 	  | Code: | 	 		  
 
/*rexx*/
 
say 'Enter DataSet Pattern'
 
pull lvl_pttrn
 
say 'Enter Member/Member Pattern'
 
pull mem_pttrn
 
 
if index(lvl_pttrn,'*') = 0 then lvl_pttrn_fmt = lvl_pttrn || '*'
 
if index(mem_pttrn,'*') = 0 then mem_pttrn_fmt = mem_pttrn || '*'
 
 
address ispexec
 
"lmdinit listid(lid) level("lvl_pttrn_fmt")"
 
"lmdlist listid(&lid) stats(no) option(save) group(test)"
 
if rc = 0 then
 
exit 0
 
 
uid = userid()
 
ldsn = uid || ".test.datasets"
 
ldsn_fmt = "'" ||ldsn|| "'"
 
eof = 'no'
 
address tso
 
"allocate da("ldsn_fmt") f(indd1) shr old"
 
 
do while eof = 'no'
 
  address tso
 
  "execio 1 diskr indd1 (stem line."
 
  if rc = 2 then
 
    eof = 'yes'
 
  else
 
    do
 
      idsn = word(line.1,1)
 
      idsn_fmt = "'" || idsn || "'"
 
      x = listdsi(idsn_fmt norecall)
 
      if SYSDSORG = "PO" & SYSREASON = 0 then
 
        do
 
         address ispexec
 
         "lminit dataid(indd) dataset("idsn_fmt") enq(shr)"
 
         "lmopen dataid(&indd)"
 
         "lmmdisp dataid("indd") option(display) member("mem_pttrn_fmt")"
 
        end
 
    end
 
end
 
 
 | 	 
  | 
			 
		  | 
	
	
		| Back to top | 
		 | 
	
	
		  | 
	
	
		| 
		
		 | 
	
	
		 |