File1 has 100 records and file2 has 200 records i want to
copy 50 records which r in both file into file3
Answer Posted / mani
First need to sort both files
READ FILE1
READ FILE2
PERFORM UNTIL EOF = 'Y'
IF FILE1-ID > FILE2-ID THEN
READ FILE2 AT END MOVE 'Y' TO EOF
ELSE IF FILE1-ID < FILE2-ID
READ FILE1 AT END MOVE 'Y' TO EOF
ELSE IF FILE1-ID = FILE2-ID
WRITE FILE3
READ FILE1 AT END MOVE 'Y' TO EOF
READ FILE2 AT END MOVE 'Y' TO EOF
END-PERFORM
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
what is use of dsn parameter in dd statement?
What are the rules employed while naming the steps in a job?
How can a fb file convert to vb file using sort program?
what is JCL?
Differentiate between the joblib and the steplib statements?
How do you run a COBOL batch program from a JCL? How do you run a COBOL/DB2 program?
Explain the function of //jcllib statement?
what is use of disp parameter in dd statement?
What do you understand by the term notcat 2 – gs?
How to read and write a single record into a file. I would like to use it to enter a single 8-character piece of information and use it to put it into a variable for processing in JCL. Thank you
What is NOTCAT ?
Immediate Job opening for mainframe professionals in Keane Bangalore. Please find the below details: Organization: Keane India Location: Bangalore Skill: COBOL, JCL,VSAM,DB2,CICS,IMS,REXX,CLIST Exp: 1 to 4 years only Employment Type: Permenant Employee Note: If you have attended keane interview in past 6 months please ignore this job opening. Please respond to email id keanemfjob@gmail.com OR keanemfjob@yahoo.in with your latest resume and following details, We will contact you within 24 hours: Total IT Exp: Exp in Mainframe: Current CTC: Expected CTC: Notice Period:
Explain the function of the dd dcb keyword?
what happens in execution stage in job processing?
What statement marks the beginning of a job step; assigns a name to the step; identifies the program or catalogued or in-stream procedure to be executed in the step?