IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to search in batch *only on few members* of a PDS?


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Gabriele Soranzo

New User


Joined: 28 Dec 2006
Posts: 6
Location: Italy, Trieste

PostPosted: Thu May 08, 2008 7:36 pm
Reply with quote

Hi all,

I have the following requirement.

I have a PDS with several thowsand of members.
I would like do a batch search using ISRSUPC only on members which name starts with a prefix (for example "XX").

If I use the ISPF panel it's easy do to it,
I can specify "MYLIB.A.B.C(XX*)',
but if I use in a Jcl the ISRSUPC utility I see only the NEWDD DD (and here I can specify only 'MYLIB.A.B.C').

How can I restrict the search only on members which name starts with "XX"? using ISRSUPC in a JCL?

Gabriele
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Thu May 08, 2008 7:47 pm
Reply with quote

I just went through ISPF Option 3.14 to build a search job for a selected list of members. I got NEWDD pointing to the PDS, OUTDD for the output, and then SYSIN contains the SRCHFOR statement, and a bunch of SELECT statements for the member names.
Back to top
View user's profile Send private message
Gabriele Soranzo

New User


Joined: 28 Dec 2006
Posts: 6
Location: Italy, Trieste

PostPosted: Thu May 08, 2008 8:04 pm
Reply with quote

Hi superk,

many ythanks for your prompt reply.

It fits almost my requirement (since your solution needs in every case of a ISPF panel, instead I have the need to use directly (and only) JCL, without to pass for a ISPF panel), but for now it is an acceptable workaround.

The last question, if you have time:
do you know if there is a way to specify wildchar * in SELECT of Sysin (I mean, for example : XX*)? Or do SELECT accepts only a list of complete names?

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

Global Moderator


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

PostPosted: Thu May 08, 2008 8:15 pm
Reply with quote

Doesn't look like it:

A.36 SELECT - Select PDS Members.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Thu May 08, 2008 10:21 pm
Reply with quote

Deleted by the author. Misread Gabriele's requirement.
Back to top
View user's profile Send private message
Phrzby Phil

Senior Member


Joined: 31 Oct 2006
Posts: 1042
Location: Richmond, Virginia

PostPosted: Fri May 09, 2008 12:58 am
Reply with quote

Once you've used 3.14 to generate the JCL, save it to your own file (e.g., a PDS) - then modify it and run it when you want.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri May 09, 2008 9:58 am
Reply with quote

Hi Gabriele,

if you have FILEAID on your system you can try this

Code:
//FILEAID  EXEC PGM=FILEAID           
//SYSPRINT DD SYSOUT=*                 
//SYSLIST  DD SYSOUT=*                 
//DD01     DD DSN=INPUT PDS,           
//            DISP=SHR                 
//SYSIN    DD *                       
$$DD01 LIST MEMBERS=ABC,               
            IF=(001,EQ,C'M')           
$$DD01 LIST MEMBERS=XY,               
            IF=(001,EQ,C'M')           
/*                                     


The above code will scan for members prefixed with ABC and XY.


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

Active User


Joined: 31 Aug 2006
Posts: 218
Location: India

PostPosted: Fri May 09, 2008 12:14 pm
Reply with quote

gcicchet wrote:

//SYSIN DD *
$$DD01 LIST MEMBERS=ABC,
IF=(001,EQ,C'M')
$$DD01 LIST MEMBERS=XY,
IF=(001,EQ,C'M')
/*
Gerry


Hi gerry

"IF=(001,EQ,C'M')".i think this will search for M in the first byte.Correct me if am wrong.
Then how to search for a particular string where we do not know its occurance using File-Aid.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri May 09, 2008 12:17 pm
Reply with quote

Hi Sri,
Code:
IF=(001,0,C' VT50I ') 


wiil search the entire record.

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

Active User


Joined: 31 Aug 2006
Posts: 218
Location: India

PostPosted: Fri May 09, 2008 12:22 pm
Reply with quote

gcicchet wrote:
Hi Sri,
Code:
IF=(001,0,C' VT50I ') 


wiil search the entire record.

Gerry


Hi gerry Its working fine.Thanks alot.
Small clarifiaction: "IF=(001,0,C' VT50I ')" what does 0 in bold specifies.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri May 09, 2008 12:31 pm
Reply with quote

Hi Sri,
Use 0 to scan to the end of the record.


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

New User


Joined: 28 Dec 2006
Posts: 6
Location: Italy, Trieste

PostPosted: Fri May 09, 2008 2:12 pm
Reply with quote

Hi all,

my customer has not installed FILEAID, but the workaround of JCL with ISRSUPC created once time it's an acceptable solution for me,

many thanks...and I'm (happily :-) impressed of the right and prompt replies on this forum !,

Gabriele
Back to top
View user's profile Send private message
sri_mf

Active User


Joined: 31 Aug 2006
Posts: 218
Location: India

PostPosted: Fri May 09, 2008 2:19 pm
Reply with quote

gcicchet wrote:
Hi Sri,
Use 0 to scan to the end of the record.


Gerry


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

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri May 09, 2008 2:32 pm
Reply with quote

Gabriele,

mio piacere. Ciao.


Gerry
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Search two or more word with FILEAID Compuware & Other Tools 15
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts How to get a stack trace on a looping... ABENDS & Debugging 5
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts Help in Automating Batch JCL jobs mon... JCL & VSAM 3
Search our Forums:

Back to Top