All Forums Database
Meem 24 posts Joined 05/07
18 Oct 2007
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?ThanksMeem

rayravi-5064 5 posts Joined 10/07
18 Oct 2007

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 gettingRegards,Ravi

joedsilva 505 posts Joined 07/05
18 Oct 2007

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 !)

Meem 24 posts Joined 05/07
18 Oct 2007

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

Fred 1096 posts Joined 08/04
19 Oct 2007

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.

You must sign in to leave a comment.