GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Mainframe  >  COBOL
Go To First  |  Previous Question  |  Next Question 
 COBOL  |  Question 93 of 162    Print  
We have two files. and we want to write the matching records from both the files to a third file.There can be duplicate records in both the input files.

  
Total Answers and Comments: 1 Last Update: February 02, 2007     Asked by: Abdul 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Sree
 
sort the two files in assecding order.. with maching sequence take one file as master file and read the master file first and read the other file for matching compare the maching value
if machval1 > machval2
read next of machfile2
if machval1 < machfval2
read next of Machfile1
if machval2 = matchval2
write into 3 fileread next of both file1, file2 and reapeat the para again..

Above answer was rated as good by the following members:
sirishal
February 02, 2007 04:16:12   #1  
Sree        

RE: We have two files. and we want to write the matchi...
sort the two files in assecding order.. with maching sequence take one file as master file and read the master file first and read the other file for matching compare the maching value

if machval1 > machval2

read next of machfile2

if machval1 < machfval2

read next of Machfile1

if machval2 matchval2

write into 3 fileread next of both file1 file2 and reapeat the para again..

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    

 Related Questions

Explain the difference between an internal and an external sort, the pros and cons, internal sort syntax etc?
An external sort is not COBOL; it is performed through JCL and PGM=SORT. It is understandable without any code reference. An internal sort can use two different syntaxes: 1.) USING, GIVING sorts are 

Latest Answer : An explicit redefines can be used at any level number except 01. An implicit redefines can occur if multiple 01s are coded for the same file. ...

Latest Answer : Hi,The XSUM parameter cannot be given with the sort card. It should be given in the SUM FIELDS card. You should write as follows://SYSIN  DD * SORT FIELDS=(40,6,PD,A) SUM FIELDS=NONE,XSUM/* ...
Read Answers (4) | Asked by : Radha

1) Without execution cobol program how to see output?2) how to rename input filename and outputfile name?3) what is flag?4) what is impact analysis what basis how will you write test cases?5) how you sea output of cics command?6) how are datasets concatenated explain with example?
i don't know please give me answer 
Read Answers (6) | Asked by : mohansharma

What is the difference between write & move in COBOL.? What is the meaning of 'TALLING' verb in cobol? What is the meaning of 'Eject' verb in cobol?
Read Answers (10) | Asked by : sanjib goswami

In file section of a COBOL program, I have the following line.Record varying from 122 to 160 depending on WS00_RECORD_LENGTH. How would the value of WS00_RECORD_LENGTH found out? Where will it be?

How to commit updated records in IMS as well as in DB2?Both in CICS and Batch. Is there any single command will do these?

Latest Answer : Hi, It is possible through jcl. For example if the input file contains 80 record length thenIn sort, INREC=(1:1,80,81:SEQNUM,6,ZD),SORT FIELDS=(81,6,ZD,D),OUTREC=(1:1,80) 1) Using inrec we need to generate the sequential number starts from ...
Read Answers (9) | Asked by : javid

Latest Answer : Hi, It is possible through jcl. For example if the input file contains 80 record length thenIn sort, INREC=(1:1,80,81:SEQNUM,6,ZD),SORT FIELDS=(81,6,ZD,D),OUTREC=(1:1,80) 1) Using inrec we need to generate the sequential number starts from ...
Read Answers (3) | Asked by : ashish surkar

Latest Answer : It is very much possible to store and read images in COBOL files, using binary format. However for displaying the image, one needs to use third-party tools. ...
Read Answers (2) | Asked by : Mandeep


 Sponsored Links

 
Related Articles

C++ Standard Input Output Stream

C Standard Input Output Stream In this C tutorial you will learn about standard input stream and standard output stream explained along with syntax and examples C programming language uses the concept of streams to perform input and output operations using the keyboard and to display information on
 

What is Data File

In a logical data model, the conceptual data model which is based on the business semantic is being defined. Thus, entities and relationships and corresponding table and column design, object oriented classes, and XML tags, among other things are being laid regardless of the database will be physica
 

Importance of Header Files

What is the importance of header files? The main role of header file is it is used to share information among various files. In brief, if we have several functions say 4 functions named as f1, f2, f3, f4 placed in file say sample.c and if all the functions want to get accessed by each other then all
 

The Interview Snafu

How to turn someone else&rsquo;s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won&rsquo;t get over the line without a polished, prof
 

Top 10 Application Security Vulnerabilities in Web.config Files - Part One

These days, the biggest threat to an network security comes from its public Web site and the Web-based applications found there. Unlike internal-only network services such as databases-which can be sealed off from the outside via firewalls-a public Web site is generally accessible to anyone who wan
 

Top 10 Application Security Vulnerabilities in Web.config Files - Part Two

Some of the most common and dangerous application security vulnerabilities that exist in ASP.NET Web-based applications come not from the C# or VB.NET code that make up its pages and service methods, but instead from the XML code that makes up its Web.config files. Incorrect configurations can open
 

NLP Mirroring and Matching Techniques

NLP Mirroring and Matching Techniques Mirroring and matching are two techniques of Neuro linguistic Programming used to gain rapport at the unconscious level This is possible by becoming like the person with whom you need to make a connection mosgoogle center Introduction Generally people look act s
 

Mainframe Features

Mainframe Features In this Mainframe tutorial you will learn about features of Mainframe Processing power memory capacity performance computing multiple operating system time sharing reliability serviceability availability clustering technology and other features available in Mainframe mosgoogle cen
 

Importance of Proper English during Job Interview

Importance of Proper English during Job Interview Your job interview is crucially important and it will determine whether or not you will get the job Depending on the type of job you re going for it is very important for you to use proper English In most cases jobs which offer higher salaries will h
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape