Page 1 of 1

Looping through fields in a job while using RTP

Posted: Fri Jun 11, 2021 3:22 am
by tbtcust
Hello All

I have an ascii fixed width file with 8 fields. I want to convert that file to a pipe "|" delimited file removing leading and trailing spaces.
I’m using RTP to make the job generic and reusable. Is there a way to loop through the fields from 1 to n?

Thanks in advance for any help.

Re: Looping through fields in a job while using RTP

Posted: Fri Jun 11, 2021 7:02 pm
by rumu
You can read the entire record in a single field as varchar-assign some large field length, then use column import stage and define the schema file and in target sequential stage use '|' delimiter. You must enable RCP at job level.
You must have subsequent jobs that reads the above output files, in those jobs you can apply trim leading trailing space not in generic job.