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 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 Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Alter &DATENS field in HEADER1 Angad DFSORT/ICETOOL 4 Mon Apr 24, 2017 11:49 am
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm


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