search string in VSAM files



Help for IBM's record-oriented filesystem VSAM, ESDS, KSDS, RRDS, LDS and Storage management Subsystems

search string in VSAM files

Postby kamal » Thu Aug 23, 2007 3:03 pm

If I need to search a string in 20 vsam files...is there any command to do so
kamal
 
Posts: 48
Joined: Wed Aug 22, 2007 2:49 pm
Has thanked: 0 time
Been thanked: 0 time

Re: search string in VSAM files

Postby CICS Guy » Thu Aug 23, 2007 3:35 pm

I assume you mean a string anywhere in these VSAM records, I can't see a way other than writing a program to do it.....
Have you looked into the manual Frank pointed you to regarding DFSORT's PARSE? The STARTAT=string operand might be able to do it.....
CICS Guy
 
Posts: 246
Joined: Wed Jun 20, 2007 4:08 am
Has thanked: 0 time
Been thanked: 0 time

Re: search string in VSAM files

Postby Frank Yaeger » Thu Aug 23, 2007 9:04 pm

I need to search a string in 20 vsam files


Search a string and do what exactly if you find it?
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1079
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 15 times

Re: search string in VSAM files

Postby kamal » Fri Aug 24, 2007 9:27 am

All the VSAM files are of same layout.
There's a field V-NAME PIC x(32).
I need to search value 'JIMI$ADAMS' in V-NAME fileds in all 20 VSAM files...

As in PS files we use SRCHFOR 'JIMI$ADAMS' ...
kamal
 
Posts: 48
Joined: Wed Aug 22, 2007 2:49 pm
Has thanked: 0 time
Been thanked: 0 time

Re: search string in VSAM files

Postby William Thompson » Fri Aug 24, 2007 12:16 pm

kamal wrote:All the VSAM files are of same layout.
There's a field V-NAME PIC x(32).
I need to search value 'JIMI$ADAMS' in V-NAME fileds in all 20 VSAM files...

As in PS files we use SRCHFOR 'JIMI$ADAMS' ...
So the string will be in the same location in every record?
Again, what will you do with this string when you find it?
William Thompson
 
Posts: 81
Joined: Sat Jun 09, 2007 4:24 am
Location: Tucson AZ
Has thanked: 0 time
Been thanked: 1 time

Re: search string in VSAM files

Postby kamal » Sat Aug 25, 2007 11:13 am

what will you do with this string when you find it?


Actually we have a Unique-ID which can be present in any one of these 20 different VSAM files.
For some reason I want to search one particular Unique-ID say 'xxxxxxxx' in these files.
I need to get the VSAM file NAME in which the Unique-ID is present.
In all files the Unique-ID is present at pos 1-8.

I just want to know is there any easy way to serch strings in VSAM ; like SRCHFOR for PS datasets.

Otherwise I could use SORT/Cobol to achieve this.
Thanks for your response(s) all.
kamal
 
Posts: 48
Joined: Wed Aug 22, 2007 2:49 pm
Has thanked: 0 time
Been thanked: 0 time


Return to VSAM/SMS

 


  • Related topics
    Replies
    Views
    Last post