writing many columns which has null values to a seq. 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
mctny
Charter Member
Charter Member
Posts: 166
Joined: Thu Feb 02, 2006 6:55 am

writing many columns which has null values to a seq. file?

Post by mctny »

Hello Everybody,
I have a problem with a stage output in a job which has many column value as null. I want to write these data to a sequential file. I have to find a way to handle nulls for every column, not only for one. there are many columns which might be null, and I don't want to edit string properties for every column. is there anyway to issue a statement like;

if anycolumn in anyrow is null, then write a special character for that value into the seq file, otherwise just write the value to the seq file.

or do you have any routine or funtion implement this, or do you have any advise?

thanks
Cetin
Thanks,
Chad
__________________________________________________________________
"There are three kinds of people in this world; Ones who know how to count and the others who don't know how to count !"
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You can specify how null is to be represented as a record level property. You can override that at the individual column level using Edit Row (right click on that column in the Columns grid to expose the menu from which you can open the Edit Row dialog).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
mctny
Charter Member
Charter Member
Posts: 166
Joined: Thu Feb 02, 2006 6:55 am

Post by mctny »

ray.wurlod wrote:You can specify how null is to be represented as a record level property. You can override that at the individual column level using Edit Row (right click on that column in the Columns grid to expose the menu from which you can open the Edit Row dialog).
I just became a premium member to read your answer, however I couldnot quite get it, my problems is there are almost 50 columns that I have to convert the potential null values to some special charater before writing seq files. if you consider there are three files to be written like that and I also decode these special character back to null before I write to Database. so I wouldnot want to edit 6 X 50 = 300 column string properties. so how can I do it stage level or (in any stage or in a transformer). you mentioned about the possibility of doing it in the record level, how would I do that? I am very new to these,
Thanks,
Chad
__________________________________________________________________
"There are three kinds of people in this world; Ones who know how to count and the others who don't know how to count !"
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

See page 5-15 of Parallel Job Developer's Guide which describes the (mutually exclusive) Null Field Length and Null Field Value properties that you can use on the Inputs link Format tab in the properties editor. Which one is correct for you will depend on the format of the file you are writing.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
mctny
Charter Member
Charter Member
Posts: 166
Joined: Thu Feb 02, 2006 6:55 am

Post by mctny »

ray.wurlod wrote:See page 5-15 of Parallel Job Developer's Guide which describes the (mutually exclusive) Null Field Length and Null Field Value properties that you can use on the Inputs link Format tab in the properties editor. Which one is correct for you will depend on the format of the file you are writing.
thank you very much, I wil check and see.
Thanks,
Chad
__________________________________________________________________
"There are three kinds of people in this world; Ones who know how to count and the others who don't know how to count !"
Post Reply