Fetch Unique and sorted data from two Cobol tables
Page 1 of 1
Fetch Unique and sorted data from two Cobol tables
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?
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
Similar topics
» differnce in finding the length cobol II and cobol III
» Generic way to fetch any combinations of columns
» Mismatch in QMF and COBOL results
» Using ISPSTART and dealing with the Log Data Set
» XCTL - Sending and receiving data of different size
» Generic way to fetch any combinations of columns
» Mismatch in QMF and COBOL results
» Using ISPSTART and dealing with the Log Data Set
» XCTL - Sending and receiving data of different size
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum