Page 1 of 1

problem in writing the data to sequential file(txt file)

Posted: Tue Apr 19, 2011 12:32 am
by srinivas.nettalam
Hi All,
When I am checking the text file created in one of our jobs the records are written as below example

Col1 Col2 Col3 111,AAA,Y
222,BBB,Y
333,CCC,N

First line with column names and the records are written in the same line instead of a newline.

What could be the issue?

format used

Delimiter =comma
final delimiter=end
Record Delimiter=UNIX newline

Posted: Tue Apr 19, 2011 12:45 am
by chulett
Where are you looking at the file, on Windows?

Posted: Tue Apr 19, 2011 1:19 am
by srinivas.nettalam
chulett wrote:Where are you looking at the file, on Windows? ...
Yes

Posted: Tue Apr 19, 2011 2:44 am
by GJ_Stage
Hi ,

Can you explain what is the flow (i .e what are the stages are used) to create this seq file.

Posted: Tue Apr 19, 2011 3:36 am
by srinivas.nettalam
GJ_Stage wrote:Hi ,

Can you explain what is the flow (i .e what are the stages are used) to create this seq file.
Got the solution...record delimiter string =DOS prompt has to be selected instead of record delimiter =unix newline

Posted: Tue Apr 19, 2011 4:13 am
by zulfi123786
the new line character in unix (as you see using vi,cat etc) is different from the one in Windows, and this topic has already been discussed in these forum.

try to cat the file in Unix and since you have used Unix new line as the record delimiter you will find that the records do appear in multiple lines.

Posted: Tue Apr 19, 2011 5:40 am
by chulett
srinivas.nettalam wrote:
chulett wrote:Where are you looking at the file, on Windows?
Yes
Yah, that was a hint. :wink:

Posted: Tue Apr 19, 2011 4:29 pm
by ray.wurlod
Use Wordpad rather than Notepad. Wordpad seems to handle both kinds of line terminator gracefully.