File gets currupt if edited in vi.

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
atulghate
Participant
Posts: 10
Joined: Sat Jul 09, 2005 8:28 am

File gets currupt if edited in vi.

Post by atulghate »

I have sequential file landed using datstage. And I am using this file in another job. For testing purpose I had to edit this file once created for one record.

I am just changing one letter. I am doing this using vi.
Once I save this file and try to read this in datstage job i get import error.

However when i do not do any editing file is read okay in next job..

Any clues...
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

The default line termination for DOS files is <cr><lf>, saving it with vi might change that to the unix <lf> character only.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Umm... don't use vi ?

Examine the file with a hex-capable editor to determine what the line terminator character(s) (if any) are.

What precisely do you mean by "corrupted"? That is, what error do you get? What raw record is sent to the reject link?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Klaus Schaefer
Participant
Posts: 94
Joined: Wed May 08, 2002 8:44 am
Location: Germany
Contact:

Re: File gets currupt if edited in vi.

Post by Klaus Schaefer »

Check if you have written the file with varchars. You might have the option "varchar prefix byte" active. This bytes may get corrupted when using vi.

In this case you better write the file without varchar prefix bytes. Have a look at the schema definition.

Best regards
Klaus
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Pls let us know, what eactly you are trying to change and who exactly you are trying to save the file?
Because I have did the same several time without any issues.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply