I have a ouptut file with fixed width fields and variable length pipe delimited fields.
How should my record level properties be ?
Initially when I had a fixed width file I would say record_length=fixed and when I had a variable length file I do delim='|' but now that I have a combination of both how should I treat this ?
I was thinking maybe I should use record_format={type=implicit}. Can someone please guide me on this ?
(FYI: I am using a paralle writer stage as output and am using the option output schema file to specify the output)
Record level properties
Moderators: chulett, rschirm, roy
Can you please give some example. I will be very thankful.
For eg:
I have the following columns (I have put them in a schema format)
record
nullable {record_format={type=implicit}, charset="ISO8859-1}
(
fname:string[max=15] {width=15}; //fixed width field
lname:string[max=20] {width=20}; //fixed width field
add_id:string; //variable length pipe delimited
field.
)
Does the above schema look right to you. Are there any other properties I need to add like mentioning that the variable width fields are pipe delimited,etc.,
For eg:
I have the following columns (I have put them in a schema format)
record
nullable {record_format={type=implicit}, charset="ISO8859-1}
(
fname:string[max=15] {width=15}; //fixed width field
lname:string[max=20] {width=20}; //fixed width field
add_id:string; //variable length pipe delimited
field.
)
Does the above schema look right to you. Are there any other properties I need to add like mentioning that the variable width fields are pipe delimited,etc.,
ps
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Declare the fixed-width columns as being of type Char with an appropriate precision, but as soon as you have even one delimiter character, you must describe the record structure as delimited. If there are no delimiters between the "fixed-size" fields, you must read them as one and parse them within the job design.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.