Maximum number of bytes in a record in flat 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
Jayakannan
Participant
Posts: 73
Joined: Wed Sep 30, 2009 5:20 am

Maximum number of bytes in a record in flat file

Post by Jayakannan »

Hi,

I am trying to create the fixed length .txt file where record length is 4096 bytes/characters and with this length the file is showing wrong record count in that file.

I reduced the record length to around 2500 bytes and then it is showing correct record count in that file.

Is there any limitation in the maximum number of bytes a record can have?
Regards,
Kannan
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Not that I'm aware of. That 4K sounds like a limitation on a single field size - is your record one long CHAR field?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Jayakannan
Participant
Posts: 73
Joined: Wed Sep 30, 2009 5:20 am

Post by Jayakannan »

No, it has multiple fields. But the last field's (FILLER) length is 3843 bytes to add spaces.

I just tried to split this field into multiple but still it is showing wrong record count (difference of 2).
Regards,
Kannan
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

How are you counting the records: wc -l? Do you have any binary data in the record? All it takes is something that looks like a linefeed to change your line count.
-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 »

Does your file have a byte order mark? (There is a property in the Sequential File stage that instructs it to ignore the BOM.)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Jayakannan
Participant
Posts: 73
Joined: Wed Sep 30, 2009 5:20 am

Post by Jayakannan »

When I run the unix command wc -l then the result is showing correct record count but in viewing the file using WinSCP editor or Notepad++ the record/line count is wrong.
Regards,
Kannan
Jayakannan
Participant
Posts: 73
Joined: Wed Sep 30, 2009 5:20 am

Post by Jayakannan »

Checked the data and there are couple of blank lines in between, not sure how they are populated.

Ray,

I am not familiar with BOM and there is no such explicit setting i could see.
Regards,
Kannan
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So are you having an actual problem with the file on the server or just after you move it over to your PC to look at it?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Jayakannan
Participant
Posts: 73
Joined: Wed Sep 30, 2009 5:20 am

Post by Jayakannan »

On the server itself because i viewed the data using WinSCP on server.
Regards,
Kannan
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

The "Win" part of that name should tell you it's not happening "on the server itself". :wink:

What I'm asking is are other processes consuming the file and having issues? I just want make sure we're solving a real problem here and not a perceived one. I'm also curious about the 'couple of blank lines in between' that you mentioned, are they the issue and have you determined their origin yet?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Jayakannan
Participant
Posts: 73
Joined: Wed Sep 30, 2009 5:20 am

Post by Jayakannan »

This is resolved.

I changed the property of Record Delimiter String = DOS format to Record Delimiter = UNIX newline and the record count is proper now (without blank lines).

This file is going to be consumed by Mainframe system which has not happened yet.

Thanks for your help!!
Regards,
Kannan
Post Reply