Fastload Fixed Length Problem

Database
Enthusiast

Fastload Fixed Length Problem

Hi All,
Im having varying record width - fixed length file.
For Instance the Fixed width length is 100 bytes(as per the data structure) but there are many records lesser than 100bytes(width) in the flat file, Iam getting "too short by ** byte(s)" while using Fastload. Kindly advice how to resolve this using fastload?

Thanks
Meem
4 REPLIES
Enthusiast

Re: Fastload Fixed Length Problem

Hi Meem,

Can u give some more information. Is there an error table getting created. Can u paste the exact description of the error you are getting

Regards,
Ravi
Enthusiast

Re: Fastload Fixed Length Problem

Sounds like an oxymoron... how can you call a file fixed width, if the record length is varying ?

most likely your file definition has VARCHAR(n) but table is of CHAR(n) (just my guess from your post)... in that case you should be using the file format as VARTTEXT or so and use VARCHAR(n) in your input file format definition. (of course that would require your file to be having records with fields delimited with something like a pipe !)
Enthusiast

Re: Fastload Fixed Length Problem

Hope this will be clear now...
The metadata defined as 100bytes(say for example some 20 fields with integer,varchar & date datatypes). There are no delimiters. Not all the records fits with in the metadata, I mean some records are 90bytes(10 bytes short). IS it possible to load in Fastload? Is there any padding can be done in Unix to make the record width fixed(100bytes) with spaces??? Kindly advice.

Regards,
Meem
Teradata Employee

Re: Fastload Fixed Length Problem

For an input VARCHAR field, FastLoad requires a two-byte binary length followed by the data. If the entire record consists of delimited text, FastLoad VARTEXT file format can do the conversion. For any other sort of VARCHAR input (e.g. paired delimiters such as quotes around text fields, only last field in the record is varying in length, etc.) you can write an AXSMOD / INMOD to process each record and supply FastLoad with data that includes the length fields.