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

How to Load Table having Null Indicator on some columns


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

New User


Joined: 11 Dec 2008
Posts: 13
Location: Phoenix, AZ, USA

PostPosted: Tue Sep 08, 2009 4:54 pm
Reply with quote

hi, i have too many insert queries in my application, we are supposed to remove the insert queries and replace them with load utilities,

my question is, can we load null indicator values from a flat file, i think we can not??

also while using multi-row concept for cursors having null indicator values, how can we go for it.
Back to top
View user's profile Send private message
Bharath Bhat

Active User


Joined: 20 Mar 2008
Posts: 283
Location: chennai

PostPosted: Tue Sep 08, 2009 5:29 pm
Reply with quote

Quote:
can we load null indicator values from a flat file, i think we can not??
Yes, We can.

Quote:
while using multi-row concept for cursors having null indicator values, how can we go for it

Elaborate your question. i.e What are you trying to do and what is the problem you are encountering?
Back to top
View user's profile Send private message
Hardik Vachhani

New User


Joined: 11 Dec 2008
Posts: 13
Location: Phoenix, AZ, USA

PostPosted: Tue Sep 08, 2009 5:33 pm
Reply with quote

i tried using multi row concept for cursors having null indicators in them but the code was abending during run time, i checked all everything else was fine, tried to run the code without those values and it ran fine.

while loading i have a doubt cause; i will have to maintain a seperate column in the flat file for the null indicators, so when i load them into table it will be considered as a table column. so can i directly load the flat file having null indicator column into table?
Back to top
View user's profile Send private message
sushanth bobby

Senior Member


Joined: 29 Jul 2008
Posts: 1020
Location: India

PostPosted: Tue Sep 08, 2009 5:34 pm
Reply with quote

Hi H.D.V,

Quote:
can we load null indicator values from a flat file, i think we can not??

Check out for the following keyword in Utility Reference & Guide for LOAD
Code:
NULLIF(      73)='?'

Thank You,
Sushanth
Back to top
View user's profile Send private message
Hardik Vachhani

New User


Joined: 11 Dec 2008
Posts: 13
Location: Phoenix, AZ, USA

PostPosted: Tue Sep 08, 2009 5:39 pm
Reply with quote

I tried to check through manual, but they have used this option while UNLOADing of table to flat file, but they didnt mention anything while performing LOAD operations.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Tue Sep 08, 2009 5:39 pm
Reply with quote

Quote:
tried using multi row concept for cursors having null indicators in them but the code was abending during run

Maybe you could post that code and state the abend code/error message?
Back to top
View user's profile Send private message
Ketan Varhade

Active User


Joined: 29 Jun 2009
Posts: 197
Location: Mumbai

PostPosted: Tue Sep 08, 2009 5:45 pm
Reply with quote

Please search the forum,
Have a look at the Link
Back to top
View user's profile Send private message
Ketan Varhade

Active User


Joined: 29 Jun 2009
Posts: 197
Location: Mumbai

PostPosted: Tue Sep 08, 2009 5:49 pm
Reply with quote

Have a look at the Example
Back to top
View user's profile Send private message
Bharath Bhat

Active User


Joined: 20 Mar 2008
Posts: 283
Location: chennai

PostPosted: Tue Sep 08, 2009 7:29 pm
Reply with quote

Quote:
while loading i have a doubt cause; i will have to maintain a seperate column in the flat file for the null indicators, so when i load them into table it will be considered as a table column. so can i directly load the flat file having null indicator column into table?



Do an unload from the table. You'll get a SYSPUNCH dataset which contains the table format (including the position of the null indicator).
The flat file should contain data as suggested by the syspunch dataset.
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 Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts How to load to DB2 with column level ... DB2 6
No new posts Remote Unload of CLOB Columns DB2 6
No new posts Multiple table unload using INZUTILB DB2 2
Search our Forums:

Back to Top