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 retrieve empty rows?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
kannag

New User


Joined: 02 Aug 2006
Posts: 23
Location: chennai

PostPosted: Fri Sep 01, 2006 11:06 am    Post subject: how to retrieve empty rows?
Reply with quote

hi all,

Suppose i have an customer table having fields like customer-id,customername,customer-address,customer-telephone.
I want to find out which customer telephone number is empty?.then i want to upgrade that field.and i want to update the customers current adress too?
anyone can give query to find out the empty rows?
Back to top
View user's profile Send private message

sri_mf

Active User


Joined: 31 Aug 2006
Posts: 215
Location: India

PostPosted: Fri Sep 01, 2006 11:15 am    Post subject: Re: how to retrieve empty rows?
Reply with quote

kannag wrote:
hi all,

Suppose i have an customer table having fields like customer-id,customername,customer-address,customer-telephone.
I want to find out which customer telephone number is empty?.then i want to upgrade that field.and i want to update the customers current adress too?
anyone can give query to find out the empty rows?


HI kanna wat do u mean by empty?is it null if so here is the query.


select * from customer where customer-telephone = NULL

u select the fields according ur requirements.here i have selected all.
Back to top
View user's profile Send private message
kannag

New User


Joined: 02 Aug 2006
Posts: 23
Location: chennai

PostPosted: Fri Sep 01, 2006 11:28 am    Post subject: need cobol coding to find empty nullable values
Reply with quote

hi all,
Suppose i have an customer table having fields like customer-id,customername,customer-address,customer-telephone.
I want to find out which customer telephone number is empty?.then i want to upgrade that field.and i want to update the customers current adress too?
anyone can give query to find out the empty rows?
and also i want cobol coding for above requirement
Back to top
View user's profile Send private message
sri_mf

Active User


Joined: 31 Aug 2006
Posts: 215
Location: India

PostPosted: Fri Sep 01, 2006 12:38 pm    Post subject: Re: need cobol coding to find empty nullable values
Reply with quote

kannag wrote:
hi all,
Suppose i have an customer table having fields like customer-id,customername,customer-address,customer-telephone.
I want to find out which customer telephone number is empty?.then i want to upgrade that field.and i want to update the customers current adress too?
anyone can give query to find out the empty rows?
and also i want cobol coding for above requirement



here is the cobol code

exec sql
query
end-exec.

EVALUATE SQLCODE
when sql-code-ok
do the chnages u require
when sql-code-not-found
display relevant message
when other
abend the program.
end-evaluate.

kanna in each when i have given explanation there u have to check ur sqlcode.let me know if u have any more issues.

correct me if i m wrong
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 Conditional highlighting of rows in I... packerm CLIST & REXX 2 Thu Sep 21, 2017 6:50 pm
No new posts column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Convert rows and column into JSON for... Dinesh Manivannan DB2 2 Sun Sep 03, 2017 6:50 pm
No new posts compare 2 rows within the same file ram_vizag SYNCSORT 7 Wed Jun 14, 2017 12:34 am

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