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

Write duplicate values in another file using cobol program


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
venkata subbareddy
Warnings : 1

New User


Joined: 26 Feb 2007
Posts: 2
Location: chennai

PostPosted: Thu Mar 01, 2007 9:32 am
Reply with quote

i have one file.This file having duplicates values, how to write the duplicate values in another file using cobol program
Back to top
View user's profile Send private message
guptae

Moderator


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

PostPosted: Thu Mar 01, 2007 9:38 am
Reply with quote

Hi there,

I am just providing u psuedo code

1)Initialize working storage variable
2)OPEN the i/p & o/p file
2)READ the file until End of file
PROCESS the record
3)ClOSE the files


PROCESS the record

IF key of the record = WS-KEY
Write record in o/p file
Else
move the key to WS-KEY
END-IF.
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 How to split large record length file... DFSORT/ICETOOL 10
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Using API Gateway from CICS program CICS 0
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top