Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Removing NULLIF columns in UNLOAD?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Jose Solis

New User


Joined: 09 Nov 2008
Posts: 2
Location: Mexico City

PostPosted: Fri Aug 27, 2010 12:56 am    Post subject: Removing NULLIF columns in UNLOAD?
Reply with quote

Hello,

I'm currently trying to unload a table to a flat file using DSNTIAUL. This file is gonna be processed and then loaded in the same table.

Some of the columns in the table are nullable, so the unloaded file (and the SYSPUNCH, of course) is full of extra NULLIF columns.

This complicates a little the processing and posterior LOAD of the file. I'd like my file without those NULLIF columns, if possible.

I'm aware I could remove those columns using ICETOOL, or a number of other options.

But I wonder... is it possible to set the UNLOAD in such a way that it does not generate those NULLIF colums?

Thanks!
Back to top
View user's profile Send private message

bamohan

New User


Joined: 29 Jan 2007
Posts: 33
Location: chennai

PostPosted: Fri Sep 17, 2010 3:39 pm    Post subject: Reply to: Removing NULLIF columns in UNLOAD?
Reply with quote

Just my guess, you can try the query select columns where your_columns is not null in your unload card?
Back to top
View user's profile Send private message
vina2010

New User


Joined: 06 Sep 2010
Posts: 19
Location: Bangalore

PostPosted: Fri Sep 17, 2010 4:28 pm    Post subject:
Reply with quote

Hi Jose Solis

If you have the restriction to select the NULLABLE column using DB2 query then use VALUE(column,' ') to convert the Nullable characters to SPACES.
Then you can use a simple DFSORT/ICETOOL to reformat this file by dropping this field.

Hope this helps.
Back to top
View user's profile Send private message
Jose Solis

New User


Joined: 09 Nov 2008
Posts: 2
Location: Mexico City

PostPosted: Tue Sep 28, 2010 7:00 pm    Post subject: Reply to: Removing NULLIF columns in UNLOAD?
Reply with quote

bamohan, vina2010:

Thank you for yor replies...

I ended up including those NULLIF fields in the process and the LOAD card. It worked ok... Problem solved...

Thank you,
Back to top
View user's profile Send private message
sravz chinnu

New User


Joined: 07 Dec 2011
Posts: 26
Location: India

PostPosted: Mon Mar 19, 2012 7:25 pm    Post subject: Re: Reply to: Removing NULLIF columns in UNLOAD?
Reply with quote

Hello all,

I am facing exactly same issue. but unable to figure out the problem. tried many ways. but m getting still spaces in my flat file.Please help me in this.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Mar 20, 2012 9:00 am    Post subject:
Reply with quote

Hello,

I suspect you need to post considerably more information for someone here to be able to help. . .

Show the part of the query that does not work as you want.
Show a bit of the problem data.
Explain what you want instead of what is created now.

Use to "Code" tag to preserve alignment and improve readability.
Back to top
View user's profile Send private message
Parthiban DS

New User


Joined: 07 Aug 2011
Posts: 5
Location: India

PostPosted: Wed Mar 21, 2012 7:36 pm    Post subject:
Reply with quote

Hello,

Below process may slove your problem.

1. Unload the data from table using DSNTIAUL. This will unload the data with NULL indicators into SYSREC00
2. Process the data.
3. Load the data into the table using DSNUTILB. you can use SYSPUNCH dataset of the UNLOAD to create the LOAD card.

Hope this will help you.


-Parthi
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm
No new posts Comparing Decimal and CHAR columns rakesh17684 DB2 7 Thu Oct 20, 2016 2:33 am
No new posts Best IMS DB Unload Utility jjabez10 IMS DB/DC 12 Thu Sep 22, 2016 11:15 pm
No new posts Removing Extra Spaces in a comma sepa... Puspojit DFSORT/ICETOOL 3 Tue Sep 13, 2016 7:46 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us