Page 1 of 1

Fixed width file

Posted: Mon Nov 17, 2008 3:50 pm
by mydsworld
I have trying to define a fixed width (length 89) file (each line terminated by DOS line) with the following options :

Record delimiter string = DOS format
Record length = fixed
Final delimiter = end

Field delimiter = none
Field Quote = none

I am getting the following error while trying to view data in a Sequential file.

"record_length=fixed" (no length given) and record field format is variable-length. The first variable-length field is "BILL_TYPE".

Please let me know where to set the field format as fixed.

Thanks

Posted: Mon Nov 17, 2008 4:33 pm
by mydsworld
I tried with the following :

Record delimiter string = \r\n
Record length = fixed
Final delimiter = none

Field delimiter = none

Then I get the following error :

Bad record delimiter after fixed-length record: expected "\r\n", got " \n"

Please advise.

Posted: Mon Nov 17, 2008 5:05 pm
by chulett
Looks like a UNIX linefeed delimiter rather than DOS style CR/LF pairs.

Posted: Mon Nov 17, 2008 6:15 pm
by Mike
What is the data type of "BILL_TYPE"?

Mike

Posted: Mon Nov 17, 2008 8:19 pm
by vmcburney
You might need to redefine your fields as CHAR of fixed width.

Posted: Mon Nov 17, 2008 8:20 pm
by vmcburney
You might need to redefine your fields as CHAR of fixed width.

Posted: Tue Nov 18, 2008 8:55 am
by mydsworld
All the fields are CHAR fields only.

Please tell me onething.I have my original Table definition (in the Table Definition\Sequential folder) different than this.Once I load the definition into the Sequential File stage I am making those modification.So, do I need to change the original Table definition with those.

Posted: Tue Nov 18, 2008 1:26 pm
by BugFree
I think you have not mentioned the field length along with the data type as CHAR. For fixed width file, you have to qoute the field length along with data type as CHAR.
I believe the warning is not because of the original table definition.

Posted: Tue Nov 18, 2008 1:52 pm
by mydsworld
The field lengths are all there in the definition.BILL_TYPE is of CHAR(4).Similarly I have all other CHAR fields with some lengths.

Posted: Tue Nov 18, 2008 2:00 pm
by kandyshandy
You said you are trying to view the data in a sequential file. Can you please let us know whether the file was created by datastage or manually?

Posted: Tue Nov 18, 2008 3:23 pm
by mydsworld
The file was created by some Legacy system and ftped to Datastage server.

Posted: Tue Nov 18, 2008 8:36 pm
by ray.wurlod
Have you imported the metadata (table definition) for this file into DataStage so that you can specify the column widths and the fact that it is a fixed width file from the outset?

Posted: Wed Nov 19, 2008 10:23 pm
by krisna
Please provide sample data.