i have two file one is ksds another one is esds i want store
matching records in flat file how to you matching.

Answers were Sorted based on User's Feedback



i have two file one is ksds another one is esds i want store matching records in flat file how to y..

Answer / satish.klnm

esds<rno, rname....>,

Procedure division.
open input fileksds, input fileesds, output file33.
para-1.
read fileesds at end perform end-para.
para-2.
start fileksds key = rno<esds> invalid key
perform para-1.
write rec33 from rec<esds>.
perform para-1.
end-para.
close fileksds, fileesds, file33.
stop run.

Is This Answer Correct ?    3 Yes 3 No

i have two file one is ksds another one is esds i want store matching records in flat file how to y..

Answer / lu

you can do like Satish or you move KSDS to flat file and
ESDS to another flat file and after this, u sort it...

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More COBOL Interview Questions

i have the following varibles in the working storage 05 ws-A PIC X(30) VALUE 'ABCDEFGHIJKLMNOPQRESTUVWXYZ ' 05 WS-B REDEFINES WS-A 10 WS-B1 PIC X(10). 10 WS-B2 PIC 9(10). 10 WS-B3 PIC X(10). If I Display B1, B2 and B3 respectively, what is the value displayed in B2

9 Answers  


In A cobol program , we can use COPY Statement in FILE- SECTION / WORKING-STORAGE SECTION / ENVIRONMENT DIVIION basically what is the difference

3 Answers   IBM,


a pic s9(4) comp b pic s9(4) comp-3 c ???????????????? d ???????????????? move a to c add a+B giving d. what is ur declaration for c,d?

4 Answers  


If we put three reads in COBOL in the same para one after the other, to read a PS file,will it read the same record thrice or it will read three records sequentially? For example : Input File 01 02 03 Para 900 Read infile Display Infile rec Read infile Display infile rec Read infile Display infile rec. What will be the output?

2 Answers  


I have two questions here. 1. How to read a flat file in reverse order? 2. How to read a VSAM KSDS file in reverse order? In both the cases we donot know the total number of records.

2 Answers   L&T,






I've one string with spaces ( I N D I A ). My question is I want remove the spaces & combine in to single string without space (INDIA).How we can write the cobol program & wich options we need to use. Please let me know.

10 Answers   Mascon,


i want to learn mainframes. i completed MCA ,whats the future of mainframes

5 Answers  


I have program P1 which calls file F1 which has 100 records and following structure 001 .................. 002 .................. 003 .................. 098 .................... 099 ................... 100 .................... Now I want to read these files and write these records in file F2 in following manner. 001 ...... 051 ..... 002 ...... 052 ..... 003 ...... 053 ..... .......... ....... .......... ....... .......... ....... 048 ........ 098 ...... 049 .......... 099 ....... 050 .... 100 ......

4 Answers   Accenture,


How to increase the logical record length of existing PS file?

7 Answers  


What are ISOLATION LEVELS? Where do we need to specify them in compiling JCL (Exactly which statement and what is syntax for it)?

2 Answers   T systems,


Syntax for JCLLIB & JOBLIB???

1 Answers  


Explain call by context by comparing it to other calls.

1 Answers  


Categories