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
 

 

How to Load Table having Null Indicator on some columns

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: How to Load Table having Null Indicator on some columns
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    Post subject:
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    Post subject: Reply to: How to Load Table having Null Indicator on some co
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: 1013
Location: India

PostPosted: Tue Sep 08, 2009 5:34 pm    Post subject:
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    Post subject: Reply to: How to Load Table having Null Indicator on some co
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: 1278
Location: Belgium

PostPosted: Tue Sep 08, 2009 5:39 pm    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    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 SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 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 Syncsort - NULL in Integer field chec... nartcr SYNCSORT 4 Thu Oct 06, 2016 6:47 am
No new posts Need Rexx Program to Load in to DB2 T... Hareesh Verma CLIST & REXX 22 Tue Sep 20, 2016 2:59 pm


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