MITHARG
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Fetch Unique and sorted data from two Cobol tables

Go down

Fetch Unique and sorted data from two Cobol tables Empty Fetch Unique and sorted data from two Cobol tables

Post  kasthuri Mon Jan 28, 2013 12:06 pm

Hi,

I have two input sorted COBOL tables (Array1 and Array2). I want to fetch the first column of the both the tables without duplicates and in sorted order, extracted in the first column of 3rd Cobol table(Array3).
No condition on rest of the fields of input Cobol tables.

Structure-
Array1(Emp_Id1, Amount1, Access_code1)
Array2(Emp_Id2, Amount2, Access_code2)
Array3((Emp_Id3, Name3, Amount3, Amount4, Amount5)

Emp_Id -- Pic 9(10)

Please see the below example for your reference :-


Array1 --

EMP_ID1
-------------

Code:
1111111111
1111111111
2222222222
4444444444
6666666666


Array2 --

EMP_ID2
-------------

Code:
1111111111
1111111111
2222222222
2222222222
3333333333
5555555555



Array3 :-

EMP_ID3
-------------

Code:
1111111111
2222222222
3333333333
4444444444
5555555555
6666666666


Please let me know if you have any concern.

Kindly let me know how we can do this in the MF COBOL. I am not sure if there is any way to do it using sort or merge commands?

kasthuri

Posts : 212
Join date : 2013-01-27

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum