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
 

 

To code SQL statements what precuations do we need take care

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
AnuB
Currently Banned

New User


Joined: 29 Aug 2005
Posts: 35

PostPosted: Mon Aug 29, 2005 7:22 am    Post subject: To code SQL statements what precuations do we need take care
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: 436
Location: chennai, India

PostPosted: Mon Aug 29, 2005 11:22 am    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts IMS region inactive - User abend code... gthmrj IMS DB/DC 5 Tue Mar 07, 2017 12:29 pm
No new posts CA Workload Automation event code help vinu78 CA Products 10 Wed Mar 01, 2017 10:05 am
No new posts MAX-RC 88 and Return code 606 in DFH0... lind sh CICS 2 Tue Jan 24, 2017 1:23 pm
No new posts How to Capture the Max return code of... anilkumar922 All Other Mainframe Topics 2 Thu Jan 12, 2017 12:02 pm


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