I am facing an issue in my cobol-Db2 program.
The scenario is like-
1. I have a table T1 in which columns are C1 and C2.
C1 column contains data like 'AB1AB2AB3AB4.....'
2. T2 table contains columns as C3 and C4
C3 column have value like 'AB1','AB2',.....
Now I want a cursor which will give me a values like-
I am confused how to get the values from first table,becuase Union will give me the proper data once i get data as 'AB1,AB2 from table C1
Substr function,Array in cobol is coming in my mind.but not getting how to proceed.
There is no relation between table T1 and T2 tables.
Only one relation I can see is-
1. Column C1 of table T1 is the concatenation of column C3 of table T2.
Like C1 contains value 'AB1AB2AB3AB4.....'
Column C3 contains value like 'AB1','AB2'......
So my cursor should return value like 'AB1','AB2','AB3','AB4'.....
Cursor I am using as I have to send the result set to front end through Stored Procedure.