How to write fixed width to the sequential file stage in DS

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
chanduchaithu
Participant
Posts: 6
Joined: Fri Jul 11, 2014 11:14 am

How to write fixed width to the sequential file stage in DS

Post by chanduchaithu »

Hello,

Simple requirement. Need to read the data from Oracle EBS and write to the flat file in a fixed width format.

So, I have created parallel job with Oracle Connector stage to read the data from source and through transformer stage writing to the Sequential file stage as target. It is working fine, with normal column value width. But, requirement is to handle exactly the column width to output file.
Ex: Dept Code --> Length 4, Start pos: 5 end Pos: 8. It can considered null value. But, next column value should start from 9th.

I tried to modify the "record length" as fixed in sequential file stage. But it is giving below error:

"Cust_JP_txt: Error when checking operator: When validating export schema: At field "DEPARTMENT_CODE": Exporting nullable field without null handling properties"

So, how to write the fixed width columns to the flat file through sequential file stage.?

Thanks in advance.

Regds,
Kumar
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The error is unrelated to fixed width, except that, when you finally get around to specifying how NULL is to be handled for this particular field, the value that you use (the Null Field Value property) needs to be of the same length as the field definition specifies.

Other than that, every field needs a width specification, and you should prefer Char to VarChar data types. If the file already exists, simply import its table definition making sure to specify "fixed width" as the format and supply the field widths where required.
Last edited by ray.wurlod on Tue Jul 22, 2014 4:46 pm, edited 1 time in total.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
rkashyap
Premium Member
Premium Member
Posts: 532
Joined: Fri Dec 02, 2011 12:02 pm
Location: Richmond VA

Post by rkashyap »

Welcome to the forum. You can also search previous posts on same topic. Some of the posts that you may like to look at ... linkand link.
Post Reply