View previous topic :: View next topic
|
Author |
Message |
AnuB Currently Banned New User
Joined: 29 Aug 2005 Posts: 33
|
|
|
|
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 |
|
|
radhakrishnan82
Active User
Joined: 31 Mar 2005 Posts: 435 Location: chennai, India
|
|
|
|
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 |
|
|
sendil
New User
Joined: 30 Jun 2005 Posts: 27
|
|
|
|
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 |
|
|
|