Hi,

I have a requirement

File A : I have 6 records out of which 4 are same.

File B: I have 8 records out of 6 records are same.

The 4 records in FILEA and 6 records in FILE B are same. If
we substract we will get two records, I need these two
records in output file


This is because to remove the duplicates from the database.

Through easytrieve we can compare but for that there should
not duplicates, but in my file I have duplicates.

Thanks in advance!!

Answers were Sorted based on User's Feedback



Hi, I have a requirement File A : I have 6 records out of which 4 are same. File B: I ha..

Answer / vijay

It is simple, you no need to code ezt pgm for eliminating
the duplicate records. Try these 2 steps to eliminate the
duplicates.

Step-1: Use sort on file 1 and use sumfields=none on the
key field, then you can get only 2 records in the output
file.

Step-1: Follow the above procedure for the file 2.

Is This Answer Correct ?    8 Yes 1 No

Hi, I have a requirement File A : I have 6 records out of which 4 are same. File B: I ha..

Answer / sreejith

read file-1
1-a
2-b
3-c
4-d
5-e
6-f
also move record in to table1 that is decalred in ws with
legth 14 until read all the record from file-1
then
read file-2
move each record into table1 and variables g,h....up to for
8 records
now the table contain 16 item
then use legth variable l
then compare each variable from table for each matching
incriment the variabe length. after searching all item from
table
compare the legth with 1
if it is greater than one eliminate
other wise write it to the output file-3
ok

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More JCL Interview Questions

How to alter the parameters for the existing gdg?

0 Answers  


Can we use two or more SYSPUNCH DD statements in a JCL for multiple unload (SYSREC00 & SYSREC01)..?

1 Answers  


For how long a job can be executed continuously in a mainframe ?

4 Answers  


If your job fails at particular step then what would be the return code for next steps

3 Answers   ADP,


Describe the EXEC statement, its meaning, syntax and keywords?

2 Answers  






On the DD statement, what is the main difference between creating a new sequential flat file and a partitioned dataset?

2 Answers  


i have a ps with two columns eno and ename , i need to copy eno column values in one ps and ename column values in one Ps ? is it possible through iebgener . how ? thx in advance

1 Answers   IBM, TCS,


How do you override a parameter in Positional parameters?

4 Answers   Thomson Reuters,


In job processing, what happens in conversion stage?

0 Answers  


Explain the purpose of dd dummy statement?

0 Answers  


What are the differences between JES2 & JES3 ?

4 Answers  


wht do u mean by notify parameter, how can u give acess to multiple users ?

4 Answers   L&T,


Categories