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: 159
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: 1278
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
This topic is locked: you cannot edit posts or make replies. Full Time COBOL Software Development ... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:24 am
This topic is locked: you cannot edit posts or make replies. COBOL Software Development Lead at Fi... shally Mainframe Jobs 0 Fri Jan 20, 2017 5:21 am
No new posts Executing OO COBOL program invoking J... Virendra Shambharkar COBOL Programming 2 Tue Jan 10, 2017 6:37 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Need Suggestion on COBOL program vickey_dw COBOL Programming 5 Thu Jan 05, 2017 10:55 pm


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