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
 
need information on DELETE condition in cobol

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

New User


Joined: 29 Sep 2007
Posts: 90
Location: chenna/i-

PostPosted: Tue Nov 12, 2013 10:11 pm    Post subject: need information on DELETE condition in cobol
Reply with quote

Hi,

My requirement is i want to delete the ids which are all having the value as FBN will be deleted from the table.

the varaible defined was a varchar value, so when i put the IF conditon it is not accepting and delete condition is going in loop

delete from table where fb_id = 'FBN'

please guide me

thanks
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Nov 12, 2013 11:22 pm    Post subject:
Reply with quote

Hello,

If you post the problem code we may be able to help. NOT the entire program, just the bit about this delete.
Back to top
View user's profile Send private message
magesh23586

Active User


Joined: 06 Jul 2009
Posts: 213
Location: Chennai

PostPosted: Wed Nov 13, 2013 2:09 am    Post subject: Reply to: need information on DELETE condition in cobol
Reply with quote

Quote:
delete from table where fb_id = 'FBN'


This is an SQL statement and not a COBOL statement
It should come under EXEC SQL and END EXEC.
Since it is COBOL + DB2 it requires compile + Bind.

Refer DB2 Precompile-Compilation-Bind Process

Competitor site link deleted.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Wed Nov 13, 2013 12:06 pm    Post subject:
Reply with quote

you can't have both :
OR "it wasn't accepted" which I interprete as a (pre-)compile error
OR "the delete goes into a loop" : which is impossible. A delete may have a wrong accesspath and dependant children may have no index so it would seem the delete takes forever. but a delete that goes into a loop would be a major problem for IBM.
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 Regarding mroe data to be processed i... vinu78 DB2 1 Mon May 27, 2019 7:31 pm
No new posts S0C7 abend while running a Cobol Program amitc23 COBOL Programming 2 Tue May 07, 2019 4:06 pm
No new posts Can we pass cobol pointer to cobol-db... rohanthengal DB2 4 Tue Mar 19, 2019 1:04 pm
No new posts Call DB2 user defined function from C... Ziko13 DB2 5 Thu Mar 14, 2019 4:46 pm
No new posts z/VM z/VSE Get CPU-time of a COBOL Ba... Andi1982 COBOL Programming 3 Mon Mar 11, 2019 3:36 pm

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