Duplicate Headers

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
PRIYARAJ
Participant
Posts: 41
Joined: Fri Jan 18, 2008 10:23 am

Duplicate Headers

Post by PRIYARAJ »

Hi,

I reading data from tables & writing to a sequential file.Each time I am running I am overwriting the existing files.
I had been running the jobs for several times.I have checked "First Line is Column Names" always.I have never got this problem before.
But only during incremental load,there is duplicate header record being created in the file.That is even the second row in the file is a Header Record.

Can anyone please help me?

Thanks
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Are your incremental jobs that read this particular file, different from your historical jobs?
Are you sure you have the same box that says "First line is column names" checked in the job(s) that read this file?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

If you read the file without "first line is column headings" checked, then the first row will be regarded as data. If you then write a file with column headings checked, the header is written, then the first row of data that you read (a header again) is also written, then the remaining data rows are written.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I was going to offer that up as well, but they are 'reading data from tables' so... ??
-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 »

Yeah. Hmm. "External tables"?

Is there a before-job or before-stage subroutine that is creating a header? Are you overwriting or appending to the file?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
jdmiceli
Premium Member
Premium Member
Posts: 309
Joined: Wed Feb 22, 2006 10:03 am
Location: Urbandale, IA

Post by jdmiceli »

Do you have 'Append to Existing File' chosen instead of 'Overwrite Existing File' ?
Bestest!

John Miceli
System Specialist, MCP, MCDBA
Berkley Technology Services


"Good Morning. This is God. I will be handling all your problems today. I will not need your help. So have a great day!"
sachin1
Participant
Posts: 325
Joined: Wed May 30, 2007 7:42 am
Location: india

Post by sachin1 »

hello your mentioned problem occurs only during incremental load where you append data to existing file without checking a box of "First line is column names".

please tick the check box "First line is column names" for your incremental load and also have a look on your created file externally with vi editior.
Post Reply