Page 1 of 1

Two files as input in cobol prgram

PostPosted: Mon Aug 31, 2009 5:49 pm
by puneetshukla
Hi,
I have two input file layout and record structure are given below
File :1 :
Name (1-20)      Roll Number(21-40)    Subject(41-60)  Qualifiaction(61-80)
Sachin Bhavsar   9867890899999         Mathmatics        Bachlor
Satish Singh       9876909090909          Hystory             Graduate
Sachin Shukla     9898989898989          Physics              Masters
Sneha Pawar       89898989898             HINDI                Senior secondry
Shweta Daware   78787878787             English               High school


File 2: 
Name (1-20)      Roll Number(21-40)   Subject(41-60)       Qualification(61-80)
Sanjay Mishra    17898989898            Cooking                 PHD
Vaishali             67767777777             Football                Eight pass
Sachin Bhavsar  9867890899999          Mathmatics           Bachlor
Satish Singh      9876909090909          Hystory                 Graduate
Sneha Pawar       89898989898            HINDI                    Senior secondry


Now , throu cobol program i want to take those record in my output file which is not matching if record is present in both file then skip that record
My output file like this :

Output :
Name (1-20)     Roll Number(21-40) Subject(41-60) Qualification(61-80
Sanjay Mishra   17898989898        Cooking        PHD
Vaishali        67767777777        Football       Eight pass

Re: Two files as input in cobol prgram

PostPosted: Tue Sep 01, 2009 2:55 am
by dick scherrer
Hello and welcome to the forum,

Suggest you practice and become comfortable with the "Code" tag - which improves readability and preserves alignment. Also, learn to Preview so you can see your post as it will appear to the forum. TWhen the post appears as you want, then Submit.

At the top of the IBM Cobol part of the forum is a "Sticky" that contains a working example of code that does what you want (2-file match/merge sample code). Download that code (right-click save-as) and make changes for your requirement.