Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

SEARCH or SEARCH ALL ?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: SEARCH or SEARCH ALL ?
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: 1187
Location: Bangalore,India

PostPosted: Fri Sep 29, 2006 3:56 pm    Post subject:
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    Post subject:
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: 755
Location: Germany

PostPosted: Fri Sep 29, 2006 6:33 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts Search a Load Module sreekanth1984 TSO/ISPF 8 Tue Jun 07, 2016 8:45 pm
No new posts Copy one PDS to another PDS based on ... alluri12 JCL & VSAM 10 Tue Sep 29, 2015 8:10 pm
No new posts Search and replace the key in the report V S Amarendra Reddy SYNCSORT 1 Thu Jul 09, 2015 7:41 pm
No new posts Search Member Name in Library (DSORG=... jackare JCL & VSAM 9 Thu Jun 25, 2015 8:15 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us