hi all
i have a question following
i am using Datastage 7.5.1A
i want all the output data are to be set as fixed length for each field
eg
row 1 "ab" "123" "dddd"
row 2 "abc" "12345" "aaaaaa"
i want output like this
row 1 "ab " "123 " "dddd "
row 2 "abc" "12345" "aaaaaa"
how can i set in sequential file thx in advance
how output data are to be set as fixed length
Moderators: chulett, rschirm, roy
-
ray.wurlod
- Participant
- Posts: 54595
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Typically fixed width data files do not include quote characters; if you want these you will need to transform your data so that they have quotes - since reading quoted delimited fields from source will strip the quotes. The transformation will need to be such as to pad the string and then surround it with quotes.
That having been done, you need the fields' data type to be Char (not VarChar), so you will need to figure out the appropriate sizes by profiling your source data (what's the maximum length of each field?).
Then all you need to do is to set the record style to "Fixed" in the Sequential File stage.
That having been done, you need the fields' data type to be Char (not VarChar), so you will need to figure out the appropriate sizes by profiling your source data (what's the maximum length of each field?).
Then all you need to do is to set the record style to "Fixed" in the Sequential File stage.
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.
fixed length
even i didnt' use quotes ...it still doesn't work.....i wonder how can i set it in sequential file which make output data are "fixed length"
thx for ur help
thx for ur help
ray.wurlod wrote:Typically fixed width data files do not include quote characters; if you want these you will need to transform your data so that they have quotes - since reading quoted delimited fields from source wi ...
-
ray.wurlod
- Participant
- Posts: 54595
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Create a text file on the server that is fixed width format. Import its table definition, specifying that it is fixed width, and therefore you need to supply a comma-separated list of field widths.
On the Format tab of a sequential file slage click Load and load that table definition. On the Columns tab click Load and load the columns for the same table definition. Now, take a look at the Format properties again, and see how fixed width is specified.
Emulate that.
On the Format tab of a sequential file slage click Load and load that table definition. On the Columns tab click Load and load the columns for the same table definition. Now, take a look at the Format properties again, and see how fixed width is specified.
Emulate that.
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.