line terminator

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
dsx_newbie
Participant
Posts: 6
Joined: Thu Jan 04, 2007 3:46 am
Location: Malaysia

line terminator

Post by dsx_newbie »

I have a ~ delimited flat file and using a pipe | as line terminator. How could I set the sequential stage to use pipe as a line terminator?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You can't... at least not directly. You've only got the three choices listed for Line Termination that you've seen:

UNIX Style (LF)
DOS Style (CR LF)
None


One option would be to preprocess the file and replace the pipes with a 'normal' line terminator. Or look into doing the 'preprocessing' directly in the stage via the Filter command. No clue on a DOS solution, but for UNIX or MKS you could pipe the file through 'tr' for example, to translate the pipe character on the fly. The stage would then read the stream output of the command as if it was a file and would be able to handle it correctly then.

Read up on the Filter option if it's something you're not familiar with. Basically, any command or series of commands you can send data through and which output that 'filtered' data to 'standard out' the stage can then read.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Tell "them" to supply a file format that conforms to one of the industry standards!

Tilde-delimited and pipe-terminated is NOT an industry standard. It is a figment of someone's deranged imagination.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That too. :lol:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply