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

Search for a string in PDS using DFSORT


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Sat Oct 07, 2006 7:52 am
Reply with quote

Hi,

I tried searching for a string in PDS (just like ISPF SEARCH option). I provided SORTIN as follows -

//SORTIN DD DSN=MYPDS.NAME,DISP=SHR

and

//SORTIN DD DSN=MYPDS.NAME(*),DISP=SHR

I was getting error in SORTIN statement. Sort card was correct (used 'SS').

Can anyone help me in solving this.

Regards,
Murali
Back to top
View user's profile Send private message
superk

Global Moderator


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

PostPosted: Sat Oct 07, 2006 12:21 pm
Reply with quote

You need to specify the member name, i.e.:

//SORTIN DD DSN=MYPDS.NAME(MEMBER),DISP=SHR
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Mon Oct 09, 2006 7:52 am
Reply with quote

Thanks SuperK for the reply.

But my requirement is to search in all the members (entire PDS), not a particular member (Just like ISPF search option - 3.14).

I hope my requirement is clear.

Regards,
Murali Mohan K
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Oct 09, 2006 8:40 pm
Reply with quote

DFSORT can only operate on one member at a time. To search all the members, you would have to specify each one separately. You could do that in one step using ICETOOL with multiple COPY operators, each of which would specify one member.
Back to top
View user's profile Send private message
bobvilch

New User


Joined: 11 Oct 2006
Posts: 3

PostPosted: Wed Oct 11, 2006 10:41 pm
Reply with quote

You did not state what you wanted to do to the members once you executed your sort. Here is a way to find values in all the members of a pds.
If your site has a tool (ie File Master or File Aid) you can enter the values you are searching for and enter the same value for the change (incase you accidentally update). Continuing should display a screen of the values that meet your change after the all members in the pds have been processed.
Back to top
View user's profile Send private message
MFRASHEED

Active User


Joined: 14 Jun 2005
Posts: 186
Location: USA

PostPosted: Wed Oct 11, 2006 10:50 pm
Reply with quote

You can also try ISRSUPC to search for a string in all members of a PDS.

Code:

//SEARCH  EXEC PGM=ISRSUPC,     
//            PARM=(SRCHCMP,     
//            'ANYC')           
//NEWDD  DD DSN=xxxx.PDSNAME, 
//          DISP=SHR             
//OUTDD  DD SYSOUT=(S)           
//SYSIN  DD *                   
SRCHFOR  'Search String'               
/*                               


Note: Do not specify (*) etc, just enter full PDS name without member info.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
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
Search our Forums:

Back to Top