Page 1 of 1

can you output data to a text file?

Posted: Tue Apr 14, 2009 12:59 pm
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?

Posted: Tue Apr 14, 2009 1:39 pm
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.

Posted: Tue Apr 14, 2009 1:44 pm
by james garner
thanks for the response, so your saying i can use a sequential file stage as my output then?

Posted: Tue Apr 14, 2009 1:45 pm
by bollinenik
yeah, you can use sequential file stage, just need to take care about file properties as fixed width file properties.

Posted: Tue Apr 14, 2009 1:52 pm
by james garner
thanks, didnt know that!

Posted: Tue Apr 14, 2009 1:53 pm
by james garner
thanks, didnt know that!

Posted: Tue Apr 14, 2009 2:03 pm
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.

Posted: Tue Apr 14, 2009 2:06 pm
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!

Posted: Tue Apr 14, 2009 2:07 pm
by chulett
Like pretty much all passive stages, they "go both ways". So to speak.