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: 1280
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 Data replication from multiple Db2 ta... kishpra DB2 1 Mon Mar 27, 2017 9:58 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
No new posts Join of more than one table dibyendumandal11111 DB2 6 Mon Feb 13, 2017 11:36 pm
No new posts VALIDATE NULL VALUE IN DB2 CASE STATE... useit DB2 5 Thu Feb 09, 2017 4:34 pm
No new posts Can DFSPARM override SORTKEYS paramet... ashek15 DB2 2 Tue Jan 31, 2017 11:36 pm


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