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

SEARCH or SEARCH ALL ?


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
murali922

New User


Joined: 25 Jul 2005
Posts: 92
Location: India

PostPosted: Fri Sep 29, 2006 3:52 pm
Reply with quote

I have a file with the following layout :-

NAME
CITY
COUNTRY

The primary key is NAME, and there is no alternate key.

Now if I want to get all the records with CITY = CHENNAI or BANGALORE
and country = INDIA .

It is simple if we are allowed to sequetially able to read the records, but how will we be able to do it if we are not allowed to read sequentially.

Is SEARCH or SEARCH ALL of any help ?

Please advice.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Fri Sep 29, 2006 3:56 pm
Reply with quote

Muralli,

I think u can get all the record with CITY = CHENNAI or BANGALORE
and country = INDIA using dfsort .
Back to top
View user's profile Send private message
murali922

New User


Joined: 25 Jul 2005
Posts: 92
Location: India

PostPosted: Fri Sep 29, 2006 4:02 pm
Reply with quote

I want to do this in the COBOL program !
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Fri Sep 29, 2006 6:33 pm
Reply with quote

Hi !

I designate that your InputFile is a VSAM KSDS File.
And also there is only PrimKey=Name and no AlternateIndex.

I never heared of special alloance of reading a VSAM KSDS File.
You can read it in direct or sequentiel way. But if you have any internaly restrictions in your company not using the seq.-reading, best is to create alternate Index.

Or, as guptae said, use the SORT utility first in one Step to sortout the
desired records, and then in a following step, execute your programm.

Regards, UmeySan
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 -> COBOL Programming

 


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 first column truncated in search result IBM Tools 13
No new posts ISRSUPC search utility - using high l... TSO/ISPF 2
No new posts To search DB2 table based on Conditio... DB2 1
Search our Forums:

Back to Top