A cobol program to read a file , match it with other if.
If match occurs then write it to an output file. If no
match then no need to write it.Error log created by program
to track any error.



A cobol program to read a file , match it with other if. If match occurs then write it to an output..

Answer / ajay kumar ande

procedure:
1. take 4 seq. files,read two files
2.if rec1(key1)=rec2(key2)
write record3
else
write record4

or using jcl
pgm=iebcmpr
sysut1 dd dsn=dataset1
sysut2 dd dsn=dataset2
sysin dd *
compare typorg=ps/po

Is This Answer Correct ?    3 Yes 4 No

Post New Answer

More COBOL Interview Questions

what will happen if pass values more than 100 using PARM parameter?

1 Answers  


what is the basic concept of mainframe? what knowledge is needed for learn this mainframe?

4 Answers   CSE, TCS, Wipro,


how to check whether the open command of a sequential file is successful? or not?

2 Answers   CSC, IBM,


What are the differences between OS VS COBOL and VS COBOL II?

1 Answers   IBM,


How To Separate The Numerics From An Alphanumric Data Item Which Contains Both Alphabates And Numerics ?

4 Answers  






What are the different data types available in COBOL?

4 Answers  


In the JCL, how do you define the files referred to in a subroutine ?

2 Answers  


I have a source program compiled with Cobol-2. The output file has a record length of 100 defined in the program but a record of 60 bytes getting written into it. i.e. The rest of 40 bytes I am not Writing anything. But it by default puts some values into the last 40 bytes. However it does not impact anything. But when Compiled the module with Enterprise Cobol the last 40 bytes were spaces as fillers. Can anyone explain?

5 Answers   Cognizant,


what is the difference between occurs and occurs depending on? i dont think so there is the difference in storage..then why we should use occurs depending on?

9 Answers   TCS, Tech Mahindra,


88 level entry is used for (a) data items in WORKING-STORAGE SECTION (b) items with RENAMES clause (c) condition-names (d) None of the above

5 Answers   TCS,


consider the following progrm statements MOVE 0 TO SW.NO.OF.REC PERFORM PRI-OUT UNTIL SW=1 DISPALY NO.OF.REC STOP RUN PRE-OUT READ IN-FILE AT END MOVE 1 TO SW WRITE OUO-REC FROM IN-REC ADD 1 TO NO.OF REC if the IN-FILE contains 1000 records what value will be displayedafter the PERFORM is over?assume that N0.OF.REC has PIC 9(4) a.1000 b.1001 c.1 d.none of the above since there is a syntex error

4 Answers   TCS,


What are 77 levels used for?

0 Answers  


Categories