MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Unique records from Table in Cobol using occurs

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
sateesh_gontla
Beginner


Joined: 23 Jan 2004
Posts: 40
Topics: 16
Location: Bangalore

PostPosted: Fri May 21, 2004 3:09 pm    Post subject: Unique records from Table in Cobol using occurs Reply with quote

Hi,

I have 3 fields defined in a table using occurs clause and I will move the data into that table and while reading that table using arrays I would like to retrieve the unique rows from the table. This requirement is to be coded in the COBOl only otherwise I would have used sysncsort.

I have the data like this :

Field-1 Field-2 Field-3
===== ========= ==========
Life 04/04/2001 07/31/2005
Life 09/16/1997 03/31/2005
Life 04/04/2001 07/31/2005
Life 09/16/1997 03/31/2005
Life 11/02/2003 12/31/9999
Life 11/02/2003 12/31/9999
Life 04/04/2001 07/31/2005
Life 11/02/2003 12/31/9999

Output should be like this :

Life 09/16/1997 03/31/2005
Life 04/04/2001 07/31/2005
Life 11/02/2003 12/31/9999

Thanks,
Sateesh
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Fri May 21, 2004 3:25 pm    Post subject: Reply with quote

sateesh_gontla,

Check the solution posted by me in this link. Customize it according to your needs.

http://www.mvsforums.com/helpboards/viewtopic.php?t=1718&highlight=search

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
sateesh_gontla
Beginner


Joined: 23 Jan 2004
Posts: 40
Topics: 16
Location: Bangalore

PostPosted: Fri May 21, 2004 3:54 pm    Post subject: Reply with quote

Hi Kolusu,

Thx a lot for great help.

Is there any other way to do, Imean any built in option to select the unique records? Why because like this I have another 3 to 4 types of columns where I need to do the same process. The performance of the program is too bad if I am using SEARCH option.

Thanks,
Sateesh
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group