IBM Power Connect, learn, share, and engage with IBMPower. Join / Log in
Originally posted by: BasilTK
Note: The steps below are written assuming that you already have the COBOL for AIX compiler and DB2 installed on your machine.
Below are the steps you could use to compile, bind and run an 'SQL embedded' test cases: 1) Run the db2profile . /home/db2/V10.5/db2in105/sqllib/db2profile
2) Connect to the database that you need: db2 connect to <databasename>
3) Compile: cob2 -c -I'/home/db2/V10.5/db2in105/sqllib/include/cobol_a' -qSQL=_"BINDFILE DATABASE <databasename> QUALIFIER <db2username> USER <db2username> USING <db2userpassword>"_: test.cbl cob2 -L'/home/db2/V10.5/db2in105/sqllib/lib' -ldb2 -o test.out test.o
4) Bind: db2 bind test.bnd
5) Run the executable:
./test.out