Search & get a value from a file in Datastage
Posted: Thu Dec 19, 2013 5:33 am
I have a reference file with the details of the fields as below:
field name, default value, length
col1, US, 10
col2, UK, 35
col3,, 10
I have the input file as;
col1, col2, col3
US, UK, NNNNNNNNNNNN
US, uk, BBBBB
US,UK,AAAA
The first 2 records will be sent to error as the length for col3 does not match with reference value and for 2nd record the default value does not match.
Is it possible to get the column name in transformer or will i need to hard code 'col1' in transformer to use as key & perform lookup on reference and get the details.
Read in an article that we cant use server routine in parallel jobs. For parallel routine i am unable to know the g++ version.
I am new to routines, can you please help me to write routines to get the field details.
Please suggest if an alternate way to get the desired output.
field name, default value, length
col1, US, 10
col2, UK, 35
col3,, 10
I have the input file as;
col1, col2, col3
US, UK, NNNNNNNNNNNN
US, uk, BBBBB
US,UK,AAAA
The first 2 records will be sent to error as the length for col3 does not match with reference value and for 2nd record the default value does not match.
Is it possible to get the column name in transformer or will i need to hard code 'col1' in transformer to use as key & perform lookup on reference and get the details.
Read in an article that we cant use server routine in parallel jobs. For parallel routine i am unable to know the g++ version.
I am new to routines, can you please help me to write routines to get the field details.
Please suggest if an alternate way to get the desired output.