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
 

 

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: 166
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 XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts Search utility(3.14) using JCl and Cobol RKS3 COBOL Programming 12 Sat Jun 10, 2017 10:24 pm
No new posts COBOL DB2 program - zIIP eligible vasanthz COBOL Programming 7 Wed May 31, 2017 5:12 am
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am


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