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: 1280
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 SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm
No new posts Joinkeys with condition scdinesh DFSORT/ICETOOL 10 Tue Feb 14, 2017 12:20 am
No new posts Mainframe Interview Questions CICS,CO... akshathan Mainframe Interview Questions 6 Thu Feb 09, 2017 6:38 pm
No new posts Submit job from Cobol with input data abdulrafi COBOL Programming 4 Wed Feb 01, 2017 12:41 pm


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