MAINFRAME - TIP OF THE DAY :
When you specified V for RECFM parameter, LRECL value is largest record in the file plus 4 bytes. These four bytes contain the actual length of each variable length record in the file
Programmers Voted for below topics. Please Vote for good Posts.
Thank You! for your feedback. Connecting to the server. Please Wait...
Posted: Mon Jul 11, 2011 1:27 pm Post subject: Question about Files matching logic
i had faced an interesting interview question in COBOL. i.e If i have two files with matching records in both files. I have to get only matching records present in both files to the new file. How can we get by using COBOL program? can anybody knows about it? please help me? thank you _________________ shanky
Joined: 23 Oct 2010 Posts: 107 Location: Chennai,India.
Posted: Mon Jul 11, 2011 3:28 pm Post subject:
i have two files with matching records in both files. I have to get only matching records present in both files to the new file
This is the one way that i know,
Perform until eof-file1 or eof-file2
If first-file-record-key > second-file-record-key
Go to check-loop
if first-file-record-key < second-file-record-key
Go to check-loop
WRITE to matching-record-file
Go to start-loop
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
Cobol Tutorial This cobol tutorial covers most of the important topics like STRING, UNSTRING, COMP, COMP-3.....
DB2 Tutorial DB2 Tutorial focuses on DB2 COBOL Programming. Explains in simple language. Some Chapters are locked, Forum members have free access to these chapters
CICS Tutorial This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming...
JCL Tutorial This is most popular JCL tutorial from mainframegurukul. It does contain important jcl ....
SORT Tutorial This Tutorial covers all important aspects of DFSORT. Has more SORT examples