Read filea And file b write the same records in both files?
Records in a but not in b record in b but not in a
Answers were Sorted based on User's Feedback
Answer / ram g
we can achieve this through jcl icetool utility..
but in cobol its not that easy but possible...
consider the scenario...
file 1 file2
5 2
4 1
6 9
1 4
considering this flat seq file:
here the files are not sorted in order and need not be..
so we should take first record from file1 and match with
all the four records in file2 it should continue for end of
file and do the same for file2. can use array logic.
sorting logic in cobol wont be useful here..
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / ravi
JOB INPUT (INFILE1 KEY (INFIL1-ID) +
INFILE2 KEY (INFIL2-ID))
IF MATCHED
PUT OUTFILE1
ELSE
IF INFILE2
OUT1-REC = INFIL1-REC
PUT OUTFILE2
ELSE
OUT1-REC = INFIL2-REC
PUT OUTFILE2
END-IF
END-IF
.
| Is This Answer Correct ? | 1 Yes | 1 No |
How did the release of cobol/370 version 1.3 improve the performance of release 1.1?
01 text-data pic x(100). move 'xyzdbfrjjg u' to text-data. how to find the value of last index of text-data?
Write a program to enter and display the names of students in a class using the occurs clause.
how will u code parm parameter and where pls ?
How will you find the currepted records in a file
IDENTIFICATION DIVISION. PROGRAM-ID. MOVEPGM. DATA DIVISION. WORKING-STORAGE SECTION. 01 WS-I PIC 9(2). PROCEDURE DIVISION. A1000-MAIN-PARA. PERFORM PARA-X WITH TEST BEFORE UNTIL WS-I= 5 STOP RUN. PARA-X. DISPLAY "BEST2". I m getting error s722,while executing the program, seems getting in loop, can anybody tell me why
I want ALL ERROR codes in VSAM
3 Answers American Express, TCS,
Program A calls program B. Will the working storage variables declared in program B be initialized every time it is called by program A or will the values be retained until the end of program A?
How to know whether the module is dynamical or statistical?
Differentiate cobol and cobol-ii. (Most of our programs are written in cobolii, so, it is good to know, how, this is different from cobol)?
What is the linkage section?
How do you come out of an EVALUATE statement?