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 How to Capture the Max return code of... anilkumar922 All Other Mainframe Topics 0 Thu Jan 12, 2017 12:02 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts IDEAL - Code Retrieval yugendran CA Products 0 Fri Nov 25, 2016 3:27 pm


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