strip BOM in schema file

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
hsahay
Premium Member
Premium Member
Posts: 175
Joined: Wed Mar 21, 2007 9:35 am

strip BOM in schema file

Post by hsahay »

Hi

I need to know the property one would use in a schema file to set STRIP BOM = true.

I need to do this because the BOM character is ending up in the data and also causing characters to shift 1 position to the right when reading a fixed length file.

I have already tried stripbom=true and strip_bom=true

My schema file is as below

// Fixed width file
record
{record_delim='\n',final_delim=none,delim=none,quote=none,charset='UTF-16LE'}
(
ServiceName:USTRING[40];
ServiceUrl:USTRING[40];
OrigTitle:USTRING[35];
Junk:USTRING[35];
OrigWriter:USTRING[35];
OrigArtist:USTRING[35];
UseType:USTRING[2];
PerfType:USTRING[2];
PerfSttDt:USTRING[8];
Duration:USTRING[4];
Plays:USTRING[9];
)

PS - Does anyone know any place where i can get a full list of all schema file properties ? For example the charset property i am using above, i had to open a ticket with IBM to find that. Earlier i was using nls_lang='UTF-16LE' - that does not work by the way.
vishal
hsahay
Premium Member
Premium Member
Posts: 175
Joined: Wed Mar 21, 2007 9:35 am

Post by hsahay »

Still don't know what property to use in the schema file, but i found a workaround.

Apparently, even though i am using a schema file to define the file metadata, i can still go into the sequential file stage, go to OPTIONS and set STRIP BOM=TRUE.

At run time, any property that is defined both in the stage as well as the schema file is overwritten by the value in the schema file.

But a property that is defined only in the stage, STRIP BOM=true, in this case, retains its value.

So it works.
vishal
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Why not save the table definition from the Sequential File stage Columns tab, then view the table definition as a record schema on the Layout tab?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply