Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to set the null value in perticular field

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: How to set the null value in perticular field
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    Post subject:
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    Post subject: hi
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    Post subject:
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    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 How to include a particular field val... sakrat DFSORT/ICETOOL 8 Fri Apr 06, 2018 8:27 pm
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Searching a table for the field name? socker_dad COBOL Programming 8 Sat Mar 31, 2018 2:57 am
No new posts Change NULL indicator in UNLOAD utility Khadhar Basha DB2 2 Fri Dec 15, 2017 3:01 pm
This topic is locked: you cannot edit posts or make replies. Incrementing current time field by 30... arunsoods DFSORT/ICETOOL 11 Thu Oct 26, 2017 3:22 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us