bulk loading fixed width seq file into oracle table

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
DS4DRIVER
Premium Member
Premium Member
Posts: 39
Joined: Thu Oct 30, 2003 1:37 pm

bulk loading fixed width seq file into oracle table

Post by DS4DRIVER »

hi,
i created a server job with cff stage , a transformer stage and oracle bulk loader stage .The aim of the job is to read a fixed width sequential file and bulk load the fixed width file into a oracle table.

All the necessary parameters were set in the oracle bulk loader stage with loadmethod set to MANUAL and the delimiter(the default delimiter is a comma)was taken off in order to have no delimiter.

i compiled and ran the job successfully.A control file and a DAT file were created . I opened the DAT file to see the data , and i saw that the data was separated by commas even though i did not specify the commas as a delimiter in the oracle bulk loader delimiter property.

but the requirement is to generate a fixed width DAT file and a control file.

Can somebody help me out in this .

Also would appreciate it if i can get a sample control file which can be used to bulk load a fixed width DAT file data into a oracle table

thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Generating the DAT file with a Sequential File stage will be much faster.
Since you're not automatically invoking the bulk loader (sqlldr), you can have your CTL file pre-written - maybe adapt the one that DataStage has produced for you.
Or you can have a job design that uses an ORABULK stage - to which no rows are passed - to create the CTL file, and a Sequential File stage to create the DAT file(s). It really is quicker to execute.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

The only reason to use the bulk loader stage is to write the control file. You're better off writing it yourself, or creating helper job to simply read an empty file and create the control file that way. Using this stage is a joke, you should simply do as Ray suggests and spool your data to a file. No matter what, you've got to write a script to run sqlldr, what's the harm in a .ctl file as well?
Kenneth Bland

Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Post Reply