Best way to add a column conditionally to a sequential file
Posted: Thu Jun 20, 2013 9:26 pm
Hi All,
I have a specific requirement of adding a column conditionally to a target sequential file. I am looking for the best way of doing it.
To put it in detail, the source can have two columns Col1, Col2. Col1 always goes to target file (which is a sequential file) but Col2 should be added to target only if it satisfies a condition. Assuming that there is only one record in source, what will be the best way to achieve this?
I think we can't use RCP as it is blocked by the conditional addition of the column on contrary to unconditional addition.
I have a workaround using sequences but I am interested to see if there is any better way. Appreciate your interest in this.
I have a specific requirement of adding a column conditionally to a target sequential file. I am looking for the best way of doing it.
To put it in detail, the source can have two columns Col1, Col2. Col1 always goes to target file (which is a sequential file) but Col2 should be added to target only if it satisfies a condition. Assuming that there is only one record in source, what will be the best way to achieve this?
I think we can't use RCP as it is blocked by the conditional addition of the column on contrary to unconditional addition.
I have a workaround using sequences but I am interested to see if there is any better way. Appreciate your interest in this.