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 does a disposition of (MOD,DELETE,DELETE) mean ?
Can anybody tell what is tool used to generate the list of PROCS used in JCL to generate a PROCTREE
have in 100 records in a file i want to read first 3 records and skip next 3 records and agan i want to read 3 records and again i want to skip 3 records... run a loop from record one to 10 evaluate i/3 if comes even then skip else write to output file
Is it possible to left uncode disp? If yes, how?
how would you create a temporary dataset? And where will you use them?
I have a COBOL program that ACCEPTs some input data. How do you code the JCL statement for this?
Suppose there are 2 Input files Infile-1 and Infile-2. Both the Files contain Employee Records. You need to compare both the files and Write the Common Records in third file named Outfile. How can we do this using File-Aid?
Brief description of inline procedure of jcl.
What is the function of //cntl statement?
how can the same proc be re-used and called by many jobs?
What parameter directs the output of the job log dataset?
What does a disposition of (new,catlg,keep) for a dsn mean?
Is acct parameter mandatory?
What is the significance of addrspc parameter in the exec statement?
Is condition checking possible in jcl?