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

How to set the null value in perticular field


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

New User


Joined: 26 Feb 2007
Posts: 24
Location: chennai

PostPosted: Fri Apr 13, 2007 4:47 pm
Reply with quote

Hi
how to set the null value in perticular field?

bye
Back to top
View user's profile Send private message
bhaskar80

New User


Joined: 12 Apr 2007
Posts: 7
Location: bangalore

PostPosted: Fri Apr 13, 2007 7:58 pm
Reply with quote

Dear Ramana,
move -1 to null indicator field which is associated with ur host variable. so that column value is set to null.
Back to top
View user's profile Send private message
mkk157

Active User


Joined: 17 May 2006
Posts: 310

PostPosted: Sun Apr 15, 2007 11:22 am
Reply with quote

Hi ramana,

I never came across this equirement, even though i know it theriotically, can u please explain me, in which situation u face this probelm.


Thanks in advance.
Back to top
View user's profile Send private message
vini_srcna

Active User


Joined: 26 May 2005
Posts: 178
Location: Copenhagen, Denmark

PostPosted: Fri Apr 20, 2007 11:52 am
Reply with quote

Check the below one if it makes some sense...

1. This is just to understand DDL:

INSERT INTO REXXTEST (USERID, ROW_NO, "NAME")
VALUES (
-- ENTER VALUES BELOW COLUMN NAME DATA TYPE LENGTH NULLS
, -- USERID CHAR 8 NO
, -- ROW_NO INTEGER NO
) -- NAME CHAR 20 YES
*** END ***

2. INSERT INTO REXXTEST VALUES('A',6,NULL)

3. UPDATE REXXTEST SET NAME = NULL

4. if its with embedded SQL
NAME_IND = -1
EXEC SQL
UPDATE REXXTEST SET NAME = :MYNAME :NAME_IND ;

Hope this is self explanatory. Let me know if you have anymore questions.
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 Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts Null values are considered in Total c... DFSORT/ICETOOL 6
No new posts Join 2 files according to one key field. JCL & VSAM 3
No new posts How to move the first field of each r... DFSORT/ICETOOL 5
No new posts S0C7 - Field getting overlayed COBOL Programming 2
Search our Forums:

Back to Top