View previous topic :: View next topic
|
Author |
Message |
arunbask Currently Banned New User
Joined: 12 Apr 2006 Posts: 7 Location: Chennai
|
|
|
|
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 |
|
|
Sathyan_pune
New User
Joined: 27 Mar 2006 Posts: 2 Location: Pune
|
|
|
|
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 |
|
|
arunbask Currently Banned New User
Joined: 12 Apr 2006 Posts: 7 Location: Chennai
|
|
|
|
Thank you very much sir |
|
Back to top |
|
|
harish_mf
New User
Joined: 31 Jul 2005 Posts: 18 Location: bangalore
|
|
|
|
for the same query listed above please code it its urgent.
Thanks |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|