Looping through fields in a job while using RTP

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
tbtcust
Premium Member
Premium Member
Posts: 230
Joined: Tue Mar 04, 2008 9:07 am

Looping through fields in a job while using RTP

Post 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.
rumu
Participant
Posts: 286
Joined: Mon Jun 06, 2005 4:07 am

Re: Looping through fields in a job while using RTP

Post 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.
Rumu
IT Consultant
Post Reply