Joined: 31 Mar 2005 Posts: 436 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.
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