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 |
if we have a 10 steps how to override the 4th step in jcl?
how to transfer the file from pc to mainframe??
01 MOVE 10 TO N 05 PERFOM PARA1 TIMES STOP RUN WAT WILL HAPPEN?? WILL IT RUN INFINITELY OR AN ERROR WIL BE THER BECAUSE NO OF TIMES IS NOT GIVEN??
What is the difference between Call and a Link?
What is report-item?
What is the maximum length of a field you can define using COMP-3?
4 Answers Complex System, Infosys,
How is sign stored in Packed Decimal fields and Zoned Decimal fields?
How does IDMS insure data integrity?
What is the difference between perform … with test after and perform … with test before?
Have you code any new programs in COBOL ? What is the functionality of the programs?
select TURE Statement(s) aboUt eject statemenet in cobol? a)The eject statememnt must be the only statement on the line b.It causes the program to edit abnormally c. eject statement can be written in either area A or area B d. specifies that the next source statement is to be printed at Top of the next page e.The EJECTstatement has no effect on the compilation of the source program itself
how to convert vsam table into DB2 table?