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 |
Mention the guidelines to write a structured cobol program?
What is the difference between a binary search and a sequential search what are the pertinent cobol?
how many subpgms we can use in a main pgm ? how do u link sub pgm to main pgm ? how can i use the parameters declared in main pgm to sub pgm ?
What is SQL Code -904 and -903 in DB2 And how to handle it?
how many bytes do SPPPP999 will store?
ZEROES and SPACES are _______ constants (a) Figurative (b) Numeric (c) Non-numeric (d) Alphabete
how we sort two input files based on a common column and giving one o/p file please send me the coding logic?
How can you declare the file ?
Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.
How can we find that module can be called – whether DYNAMICALLY or STATICALLY?
input:- A 10 20 30 40 B 5 7 10 14 C 8 12 14 16.... output:- A = 100,B=36,C=50. Here spaces are considered between numbers. When we give input as above, the numbers should be added n displayed.So please help me out.
what happens if we wont give timestamp in precompilation process ?