Convert Char to Integer in transformer
Posted: Thu Nov 06, 2014 4:50 am
Hi All, I have a job in our project. Job reads a flat file into sequential file and load that to a table. Transformer stage is used in between.
Input file has a column of Char(1), Emp_type and incoming values can be "P" or "T" only, for Permanent and Temporary employees. Now client want us to covert that "P" to 1 and "T" to 2 and load that to table. Earlier we were just passing T and P to table.
Please let me how this can be achieved. I'll really appreciate, If someone can provide exact code to perform this, as I'm new to Datastage
Input file has a column of Char(1), Emp_type and incoming values can be "P" or "T" only, for Permanent and Temporary employees. Now client want us to covert that "P" to 1 and "T" to 2 and load that to table. Earlier we were just passing T and P to table.
Please let me how this can be achieved. I'll really appreciate, If someone can provide exact code to perform this, as I'm new to Datastage