IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

To code SQL statements what precuations do we need take care


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
AnuB
Currently Banned

New User


Joined: 29 Aug 2005
Posts: 33

PostPosted: Mon Aug 29, 2005 7:22 am
Reply with quote

In or application program, i.e, COBOL , if we code some SQL statements then what precuations do we need to take care so that the program runs succesfully ?

Regards,
Anu.
Back to top
View user's profile Send private message
radhakrishnan82

Active User


Joined: 31 Mar 2005
Posts: 435
Location: chennai, India

PostPosted: Mon Aug 29, 2005 11:22 am
Reply with quote

Take care the following:
1.Declare all the variables and data structures that the db mgr uses to interact with the host program.
2.SQL statements provided for error handling by setting up the SQL communications area.
3.connection to database server.
4.privileges.
Back to top
View user's profile Send private message
sendil

New User


Joined: 30 Jun 2005
Posts: 27

PostPosted: Mon Aug 29, 2005 11:48 am
Reply with quote

1) Decalre DCLGEN(table attribute) in working storage section( exec sql include xxxxx end-exec)
2) Declare SQL communication area for error checking.
3) Initialize Dclgen field(Host language field). Because it avoids inserting a low values in a table.
4) Write a query as per your requirements
5) Sql-code checking (this is an correct method to do the code)
6) write a syncpoint command, if you are doing any insetion or updation

Thanks
Sendil
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
Search our Forums:

Back to Top