IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

how to eliminate null indicator values in db2 unload file.


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
surezznag

New User


Joined: 04 Aug 2023
Posts: 6
Location: India

PostPosted: Tue Aug 06, 2024 10:59 am
Reply with quote

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
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2141
Location: USA

PostPosted: Tue Aug 06, 2024 7:24 pm
Reply with quote

You can find the answer here, with many, many examples:
DFSORT Application Programming Guide
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2141
Location: USA

PostPosted: Tue Aug 06, 2024 9:19 pm
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3076
Location: NYC,USA

PostPosted: Wed Aug 07, 2024 4:15 am
Reply with quote

You could simply search the forum as this has been discussed several times in past.
www.ibmmainframeforum.com/dfsort-icetool-icegener/topic11757.html
www.ibmmainframeforum.com/dfsort-icetool-icegener/topic3971.html
Back to top
View user's profile Send private message
surezznag

New User


Joined: 04 Aug 2023
Posts: 6
Location: India

PostPosted: Wed Aug 07, 2024 12:01 pm
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3076
Location: NYC,USA

PostPosted: Wed Aug 07, 2024 12:38 pm
Reply with quote

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
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2141
Location: USA

PostPosted: Wed Aug 07, 2024 7:29 pm
Reply with quote

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??? icon_axe.gif
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2141
Location: USA

PostPosted: Fri Aug 09, 2024 6:44 pm
Reply with quote

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" 824.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Unable to interpret a hex value to De... COBOL Programming 7
No new posts Format Binary file to EBCDIC JCL & VSAM 4
No new posts Unload and Load ISPF Table TSO/ISPF 4
No new posts Binary File format getting change whi... All Other Mainframe Topics 7
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
Search our Forums:

Back to Top