|
View previous topic :: View next topic
|
| Author |
Message |
bunty_28
New User
Joined: 27 Oct 2009 Posts: 4 Location: pune
|
|
|
|
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 |
|
 |
Ketan Varhade
Active User

Joined: 29 Jun 2009 Posts: 197 Location: Mumbai
|
|
|
|
| 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 |
|
 |
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
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 |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
 |
bunty_28
New User
Joined: 27 Oct 2009 Posts: 4 Location: pune
|
|
|
|
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 |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
| 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 |
|
 |
Binop B
Active User

Joined: 18 Jun 2009 Posts: 407 Location: Nashville, TN
|
|
|
|
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 |
|
 |
bunty_28
New User
Joined: 27 Oct 2009 Posts: 4 Location: pune
|
|
|
|
can anybody confirm the solution for this?
I know only JCL, don't know rexx. |
|
| Back to top |
|
 |
bunty_28
New User
Joined: 27 Oct 2009 Posts: 4 Location: pune
|
|
|
|
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 |
|
 |
Binop B
Active User

Joined: 18 Jun 2009 Posts: 407 Location: Nashville, TN
|
|
|
|
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...  |
|
| Back to top |
|
 |
Marso
REXX Moderator

Joined: 13 Mar 2006 Posts: 1356 Location: Israel
|
|
|
|
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 |
|
 |
superk
Global Moderator

Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|