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!!

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

How would you understand error(execution phase)?

630


What is jcl in mainframe?

690


Explain how can a jobs execution priority be modified?

742


what are the statements that are not valid to be included in an include statement?

776


Can an individual step be restricted from using all the jobs allowed cpu time?

1009






define cond parameter in jcl?

778


whats the diff bw the evaluate also and and?

1857


what happens in conversion stage in job processing?

730


Explain dd statement in jcl?

644


List in order the hierarchical levels of jcl?

670


What is the function of the dd dcb keyword?

828


if the submitter of a job wants to inform another user about the job completion, how can it be done?

756


I had Records in file Like this Company Code IBM 2 IBM 1 IBM 4 WIPRO 3 WIPRO 2 WIPRO 9 TCS 4 TCS 6 TCS 3 i want the record of every company with highest code How can i do that?

8683


What do you understand by jcl?

629


What is multithreading in jcl?

941