View previous topic :: View next topic
|
Author |
Message |
surezznag
New User
Joined: 04 Aug 2023 Posts: 6 Location: India
|
|
|
|
Can anyone please suggest me how to eliminate null indicator values '?' in db2 unload file. Null indicator values are appearing very next to null allowable fields and when they have null value in it.
[/code] |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2141 Location: USA
|
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2141 Location: USA
|
|
|
|
Hint:
Use BUILD=(...) parameter as part of either INREC, or OUTREC, or OUTFIL statement of SORT utility.
If your term "eliminate field" stands for "replace field with blank", then you can also use OVERLAY=(...) parameter. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
Back to top |
|
|
surezznag
New User
Joined: 04 Aug 2023 Posts: 6 Location: India
|
|
|
|
Apologies. I would like to eliminate the null indicator values at the time of unloading stage and do not want it in extra sort step. Is there any unload parameter that could eliminate null indicator values?
for example, if col1 is null allowable field and if it has null value in it then '?' value will appear very next to col1 which is null indicator and record length also will increase extra one byte. But I want unload file without null indicator values and col1 should have null value. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
Either populate the values in the table for nulls or use the select query with value function to assign 0 or space if null.
Moved to db2 section . |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2141 Location: USA
|
|
|
|
surezznag wrote: |
Apologies. I would like to eliminate the null indicator values at the time of unloading stage and do not want it in extra sort step |
Why did you create more mess when placing your topic to DFSORT forum??? |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2141 Location: USA
|
|
|
|
surezznag wrote: |
Can anyone please suggest me how to eliminate null indicator values '?' in db2 unload file. Null indicator values are appearing very next to null allowable fields and when they have null value in it.[/code] |
NULL indicator is a very significant part of the data stored in DB2.
So called "requirement" to delete this indicator is very similar to another "requirement", such as "delete high portion of long decimal, because all values are not big enough to stretch into its hi-order part" |
|
Back to top |
|
|
|