Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

how to search n mem in n PDS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
View previous topic :: :: View next topic  
Author Message
bunty_28

New User


Joined: 27 Oct 2009
Posts: 4
Location: pune

PostPosted: Wed Nov 11, 2009 1:28 pm    Post subject: how to search n mem in n PDS
Reply with quote

Hi,

I have to check n number of member in n number of PDS, that they are present or not.
How to do it with JCl or with utility?
I can do it manually, but it is time consuming.
please help me out.

Thanks
Back to top
View user's profile Send private message

Ketan Varhade

Active User


Joined: 29 Jun 2009
Posts: 197
Location: Mumbai

PostPosted: Wed Nov 11, 2009 1:42 pm    Post subject:
Reply with quote

Code:

//SEARCH  EXEC PGM=ISRSUPC,
//            PARM=(SRCHCMP,
//            'ANYC')
//NEWDD  DD DSN=pds name,
//          DISP=SHR
//OUTDD  DD SYSOUT=(A)
//SYSIN  DD *
SRCHFOR  'MEMBER'




This is just the batch mode of 3.14 , you can do the same for searching
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Wed Nov 11, 2009 1:50 pm    Post subject:
Reply with quote

Hi,

can you please explain or give more information on what you mean by this
Quote:
I have to check n number of member in n number of PDS, that they are present or not.


Gerry
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Nov 11, 2009 1:59 pm    Post subject:
Reply with quote

And maybe reveal how the input information listing the PDS names and the member names will be stored.

Are there any restrictions on what you can and cannot use, because in the past forum members have given solutions to requests only for the OP to turn around afterwards and whinge about not being allowed to use REXX, or ICETOOL or whatever ..................

And maybe you could explain your logic as to why this was posted in the COBOL forum when you want to use a utility ?
Back to top
View user's profile Send private message
bunty_28

New User


Joined: 27 Oct 2009
Posts: 4
Location: pune

PostPosted: Wed Nov 11, 2009 2:16 pm    Post subject:
Reply with quote

Hi,

I have 2000 member to search in 50 PDS
either these 2000 present in mentioned 50 PDS or not.
To do it manually is time consuming, I know ISRUPC utility, will it work i have to confirm it.

Thanks
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Nov 11, 2009 2:26 pm    Post subject:
Reply with quote

expat wrote:
And maybe reveal how the input information listing the PDS names and the member names will be stored.

How is this information available ?

If the information is available in a standard PS file, you can use a loop in REXX to invoke the search utility and parse the output very easily.
Back to top
View user's profile Send private message
Binop B

Active User


Joined: 18 Jun 2009
Posts: 407
Location: Nashville, TN

PostPosted: Wed Nov 11, 2009 2:40 pm    Post subject:
Reply with quote

Hi Bunty,

As Gerry asked, I guess you need to explain your question better.
Am still confused as to whether
-> you want to find a member in the 50 PDS's or
-> search a string inside all the members inside these PDS...
Back to top
View user's profile Send private message
bunty_28

New User


Joined: 27 Oct 2009
Posts: 4
Location: pune

PostPosted: Wed Nov 11, 2009 2:51 pm    Post subject:
Reply with quote

can anybody confirm the solution for this?
I know only JCL, don't know rexx.
Back to top
View user's profile Send private message
bunty_28

New User


Joined: 27 Oct 2009
Posts: 4
Location: pune

PostPosted: Wed Nov 11, 2009 3:07 pm    Post subject:
Reply with quote

Hi Binop,


As per your wordings:
-> you want to find a member in the 50 PDS's

simply, I have to search member in PDS, but the problem is I have numerous PDS and numerous member.
How could I find 2000 members(not the string) in 50 PDS ,using JCl or Utility?
Back to top
View user's profile Send private message
Binop B

Active User


Joined: 18 Jun 2009
Posts: 407
Location: Nashville, TN

PostPosted: Wed Nov 11, 2009 4:10 pm    Post subject:
Reply with quote

Hi,

Just to confirm, is these PDS names completely different.

In these cases i usually use 3.4 option itself to find the member.
Say your PDS are...
A.QUAL1.QUAL2.PDS0001
A.QUAL1.QUAL2.PDS0002
:: ::
A.QUAL1.QUAL2.PDS0049
A.QUAL1.QUAL2.PDS0050

In 3.4 if you give A.QUAL1.QUAL2.PDS*, it will list all these PDS and in the command line if u issue M <member-name> ... that will show you whether the member is available or not...

Of Course... this method has its disadvantages also... icon_razz.gif
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1226
Location: Israel

PostPosted: Wed Nov 11, 2009 6:25 pm    Post subject:
Reply with quote

You can use IEHLIST to list the members of your PDSs:
Code:
//STEP01   EXEC PGM=IEHLIST
//SYSPRINT DD   DISP=SHR,DSN=hlq.work(name1)
//volser   DD   UNIT=3390,VOLUME=SER=volser,DISP=OLD
//SYSIN    DD   *
    LISTPDS   DSNAME=pds.name1,VOL=3390=volser
/*
You have to do this 50 times to create 50 members, one for each of your PDSs.

Then you can use ISRSUPC to seach for members in these lists:
Code:
//SEARCH  EXEC PGM=ISRSUPC,
//            PARM=(SRCHCMP,LMTO)
//NEWDD  DD DISP=SHR,DSN=hlq.work
//OUTDD  DD SYSOUT=*
//SYSIN  DD *
SRCHFOR  'MEMBER1'
SRCHFOR  'MEMBER2'
SRCHFOR  'MEM2000'
/*
From the result of this search, you will be able to tell:
The word 'MEMBERn' was found in member 'name1' (which means MEMBERn was found in pds.name1)
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Thu Nov 12, 2009 12:54 am    Post subject: Reply to: how to search n mem in n PDS
Reply with quote

My thought:

Code:

//STEP0001 EXEC PGM=ICEMAN                                 
//SORTIN   DD   *                                           
list of the PDS names to get member lists for
/*                                                         
//SORTOUT  DD   DSN=&&T1,DISP=(,PASS),UNIT=VIO,             
//         SPACE=(CYL,(1,1),RLSE)                           
//SYSOUT   DD   SYSOUT=*                                   
//SYSIN    DD   *                                           
  OPTION COPY                                               
  OUTFIL BUILD=(C'LISTDS ',                                 
    1,80,SQZ=(SHIFT=LEFT,LEAD=C'''',TRAIL=C''' MEMBERS'))   
/*                                                         
//*                                                         
//STEP0002 EXEC PGM=IKJEFT01                               
//SYSTSIN  DD   DSN=&&T1,DISP=(OLD,DELETE)                 
//SYSTSPRT DD   DSN=&&T2,DISP=(,PASS),UNIT=VIO,             
//         SPACE=(CYL,(1,1),RLSE)                           
//*                                                         


which gives you a running list of LISTDS 'pds' MEMBERS output in the format:

Code:

 READY                                 
 LISTDS 'pds_name_1'  MEMBERS         
 pds_name_1
 --RECFM-LRECL-BLKSIZE-DSORG           
   FB    80    27920   PO               
 --VOLUMES--                           
   volser                               
 --MEMBERS--                           
   mem1
   mem2                               
   mem3
   ...
   memnn         
 READY                                 
 LISTDS 'pds_name_2'  MEMBERS         
 pds_name_2
 --RECFM-LRECL-BLKSIZE-DSORG           
   FB    80    27920   PO               
 --VOLUMES--                           
   volser                               
 --MEMBERS--                           
   mem1
   mem2                               
   mem3
   ...
   memnn                       


which can then be tweaked a bit with an ICETOOL step:

Code:

//*                                                                   
//STEP0003 EXEC PGM=ICETOOL                                           
//T2       DD   DSN=&&T2,DISP=(OLD,DELETE)                           
//T3       DD   DSN=&&T3,DISP=(,PASS),UNIT=VIO,                       
//         SPACE=(CYL,(1,1),RLSE)                                     
//OUT      DD   SYSOUT=*                                             
//DFSMSG   DD   SYSOUT=*                                             
//TOOLMSG  DD   SYSOUT=*                                             
//TOOLIN   DD   *                                                     
COPY FROM(T2) USING(CTL1)                                             
COPY FROM(T3) USING(CTL2)                                             
/*                                                                   
//CTL1CNTL DD   *                                                     
  INREC IFTHEN=(WHEN=INIT,BUILD=(1,4,5:6)),                           
    IFTHEN=(WHEN=GROUP,                                               
      BEGIN=(5,7,CH,EQ,C'LISTDS'),PUSH=(85:12,46))                   
  OUTFIL FNAMES=T3,CONVERT,                                           
    PARSE=(%01=(STARTAFT=X'7D',ENDBEFR=X'7D',FIXLEN=44)),             
    OUTREC=(5,80,%01)                                                 
/*                                                                   
//CTL2CNTL DD   *                                                     
  INREC IFTHEN=(WHEN=GROUP,                                           
    BEGIN=(1,11,CH,EQ,C'--MEMBERS--'),                               
    END=(1,5,CH,EQ,C'READY'),                                         
    PUSH=(125:SEQ=4))                                                 
  OUTFIL FNAMES=OUT,INCLUDE=(125,4,FS,EQ,NUM,AND,                     
         (1,11,CH,NE,C'--MEMBERS--',AND,1,5,CH,NE,C'READY')),         
    BUILD=(3,8,X,81,44)                                               
/*                                                                   
//*


which would basically give you the output:

Code:

mem1      pds_name_1     
mem2      pds_name_1     
...                       
memnn     pds_name_1     
mem1      pds_name_2     
mem2      pds_name_2     
...                       
memnn     pds_name_2     
...                       
mem1      pds_name_nn     
mem2      pds_name_nn     
...                       
memnn     pds_name_nn     


Yes, I know that the ICETOOL step needs some tweaking.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Search a Load Module sreekanth1984 TSO/ISPF 8 Tue Jun 07, 2016 8:45 pm
No new posts Copy one PDS to another PDS based on ... alluri12 JCL & VSAM 10 Tue Sep 29, 2015 8:10 pm
No new posts Search and replace the key in the report V S Amarendra Reddy SYNCSORT 1 Thu Jul 09, 2015 7:41 pm
No new posts Search Member Name in Library (DSORG=... jackare JCL & VSAM 9 Thu Jun 25, 2015 8:15 pm
No new posts Suggestion on Search and Split using ... shiitiizz DFSORT/ICETOOL 14 Tue Jun 16, 2015 1:20 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us