can you output data to a text file?

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
james garner
Premium Member
Premium Member
Posts: 21
Joined: Thu Jul 10, 2008 8:12 am
Location: amherst, NY

can you output data to a text file?

Post by james garner »

I'm kind of new at this still and was wondering if there was a way to output data in a fixed width format to a text file?
bollinenik
Participant
Posts: 111
Joined: Thu Jun 01, 2006 5:12 am
Location: Detroit

Post by bollinenik »

Yeah, you just need to define metadata in sequential file give the file extension as .txt at end of file name and properties should be Fixedwidth
Delimiter=none
record delimited= newline
and try to define metadata exactly as Data length and give data type as char so that is going to be fixed width file.
james garner
Premium Member
Premium Member
Posts: 21
Joined: Thu Jul 10, 2008 8:12 am
Location: amherst, NY

Post by james garner »

thanks for the response, so your saying i can use a sequential file stage as my output then?
bollinenik
Participant
Posts: 111
Joined: Thu Jun 01, 2006 5:12 am
Location: Detroit

Post by bollinenik »

yeah, you can use sequential file stage, just need to take care about file properties as fixed width file properties.
james garner
Premium Member
Premium Member
Posts: 21
Joined: Thu Jul 10, 2008 8:12 am
Location: amherst, NY

Post by james garner »

thanks, didnt know that!
james garner
Premium Member
Premium Member
Posts: 21
Joined: Thu Jul 10, 2008 8:12 am
Location: amherst, NY

Post by james garner »

thanks, didnt know that!
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

bollinenik wrote:give the file extension as .txt at end of file name
Actually, you can use whatever extension you like or none at all, makes absolutely no difference.
-craig

"You can never have too many knives" -- Logan Nine Fingers
james garner
Premium Member
Premium Member
Posts: 21
Joined: Thu Jul 10, 2008 8:12 am
Location: amherst, NY

Post by james garner »

for some reason i thought they were only used for input files.. i just tried it and it worked perfectly, thanks again!
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Like pretty much all passive stages, they "go both ways". So to speak.
-craig

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