DataStage scenario based question:
There is a column having both numbers and alphabet, the requirement is to separate all the numbers in one column and alphabet in other column.
First read the input data in sequential file stage:
Next pass the input data to transformer stage. We can separate alphabets and numeric using 2 stage variables in transformer stage.
Create stage variables like below:
svAlpha: Convert("0123456789","",lnk_alphanumerics.MixData) svNumerics: Convert(svAlpha,"",lnk_alphanumerics.MixData)
Read also: What is a Schema File in DataStage?
Assign these stage variables to output columns like below.
svAlpha = Alpha svNumerics = Number
Final job design would be:
Compile and run the job.
We will get output like below.
Thanks for the great blog for learning. I am new for Datastage and it is very helpful for me to understand. It would be great if you can add additional details (Step by step process) so that beginners can understand easily. Thanks for the support keep it up the good work.