Folder Stage + extra lines

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
MikeMette
Participant
Posts: 3
Joined: Thu May 15, 2003 11:43 am
Location: USA

Folder Stage + extra lines

Post by MikeMette »

Hello,

I'm using the Folder Stage to merge several files together. Between each file I'm getting a blank line. I'm working on a Unix server. Any suggestions of what to look for?

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

Post by ray.wurlod »

The end of file character (Ctrl-D in UNIX, Ctrl-Z in Windows).

It's probably impossible to check for when using the Folder stage. Alter your design so that empty lines are filtered out (for example, filter through grep -v '' in UNIX)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
MikeMette
Participant
Posts: 3
Joined: Thu May 15, 2003 11:43 am
Location: USA

Post by MikeMette »

ray.wurlod wrote:The end of file character (Ctrl-D in UNIX, Ctrl-Z in Windows).

It's probably impossible to check for when using the Folder stage. Alter your design so that empty lines are filtered out (for example, filter through grep -v '' in UNIX)



Hi Ray,

Thanks for the feedback. I'm trying to keep all my file manipulations inside of datastage. But maybe I can clean the resulting file using the After-Job routine. I'll try it out.

Mike
Mike Mette
ray.wurlod
Participant
Posts: 54595
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You CAN do this within DataStage! 8)
The Sequential File stage (version 6 and later) supports the idea of streaming the data through a filter command.
They had zip/unzip in mind when they first created it, but there's no restriction. The stdout of the filter command becomes the stream that is read by the Sequential File stage.
Check it out!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
MikeMette
Participant
Posts: 3
Joined: Thu May 15, 2003 11:43 am
Location: USA

Post by MikeMette »

ray.wurlod wrote:You CAN do this within DataStage! 8)
The Sequential File stage (version 6 and later) supports the idea of streaming the data through a filter command.
They had zip/unzip in mind when they first created it, but there's no restriction. The stdout of the filter command becomes the stream that is read by the Sequential File stage.
Check it out!


You know I looked at that originally, but didn't spend enough time with it. I ended up creating another job that strips all blank lines plus others out of the file. It's not pretty but it will be easy to support for others on my team. I will go back and play with that feature, it could have a lot more uses.

Thanks for your help Ray!

Mike
Mike Mette
Post Reply