Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Logic to eliminate the duplicates in cobol

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
arunbask
Currently Banned

New User


Joined: 12 Apr 2006
Posts: 7
Location: Chennai

PostPosted: Tue Jul 25, 2006 6:30 am    Post subject: Logic to eliminate the duplicates in cobol
Reply with quote

HAI given input number is 1,2,2,3,4,4,5
and give me the logic to eliminate the duplicate in cobol.
Back to top
View user's profile Send private message

Sathyan_pune

New User


Joined: 27 Mar 2006
Posts: 2
Location: Pune

PostPosted: Tue Jul 25, 2006 9:56 am    Post subject: Re: Hai please help me to eliminate duplicate
Reply with quote

1. Sort the given items in ascending / desceding order

2. Read the first item, move to output file / table and consider it as cur-item

3. Read the next item, if eof stop the process

4. compare with cur-item, if both are equal go to step 3 to read next item

5. if both are not equal, move the item to output file / table and make it as cur-item, go to step 3
Back to top
View user's profile Send private message
arunbask
Currently Banned

New User


Joined: 12 Apr 2006
Posts: 7
Location: Chennai

PostPosted: Wed Jul 26, 2006 12:19 am    Post subject: Thank you very much sir
Reply with quote

Thank you very much sir
Back to top
View user's profile Send private message
harish_mf

New User


Joined: 31 Jul 2005
Posts: 18
Location: bangalore

PostPosted: Wed Dec 27, 2006 3:16 pm    Post subject:
Reply with quote

for the same query listed above please code it its urgent.

Thanks
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Wed Dec 27, 2006 3:35 pm    Post subject:
Reply with quote

harish_mf wrote:
for the same query listed above please code it
Code what? In what language? Are you not a programmer?
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Dec 28, 2006 4:41 am    Post subject:
Reply with quote

Hello,

Frank Yeager posted this on the DFSORT forum. Someone there needed to eliminate duplicates.

Code:

//S2 EXEC PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=...  output file
//SYSIN    DD    *
  SORT FIELDS=(1,19,CH,A)
  OPTION EQUALS
  SUM FIELDS=NONE
/*
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 -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Is CICS BMS logic on z/OS different ... Andi1982 CICS 2 Fri Dec 01, 2017 1:56 pm
This topic is locked: you cannot edit posts or make replies. Cobol to fetch the content by using s... arunc55 COBOL Programming 4 Fri Nov 17, 2017 1:25 pm
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am
No new posts COBOL - EXIT statement weird behavior anthony.pangestu COBOL Programming 0 Fri Oct 27, 2017 9:57 am
No new posts IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us