problem in writing the data to sequential file(txt 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
srinivas.nettalam
Participant
Posts: 134
Joined: Tue Jun 15, 2010 2:10 am
Location: Bangalore

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

Post 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
N.Srinivas
India.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Where are you looking at the file, on Windows?
-craig

"You can never have too many knives" -- Logan Nine Fingers
srinivas.nettalam
Participant
Posts: 134
Joined: Tue Jun 15, 2010 2:10 am
Location: Bangalore

Post by srinivas.nettalam »

chulett wrote:Where are you looking at the file, on Windows? ...
Yes
N.Srinivas
India.
GJ_Stage
Participant
Posts: 131
Joined: Mon Oct 27, 2008 6:59 am

Post by GJ_Stage »

Hi ,

Can you explain what is the flow (i .e what are the stages are used) to create this seq file.
Jothi
srinivas.nettalam
Participant
Posts: 134
Joined: Tue Jun 15, 2010 2:10 am
Location: Bangalore

Post 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
N.Srinivas
India.
zulfi123786
Premium Member
Premium Member
Posts: 730
Joined: Tue Nov 04, 2008 10:14 am
Location: Bangalore

Post 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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

srinivas.nettalam wrote:
chulett wrote:Where are you looking at the file, on Windows?
Yes
Yah, that was a hint. :wink:
-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 »

Use Wordpad rather than Notepad. Wordpad seems to handle both kinds of line terminator gracefully.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply