Page 1 of 1

Executing DB2 Commands in Cobol

PostPosted: Wed Apr 03, 2019 11:23 pm
by pjugali
I am working on requirement where in the first program reads sysidm.packages to find packages which are old (having more than 5 version) and create a file output containing FREE PACKAGE dsn commands.
This file is used in next step to free packages using utility IKJEFT1B. Currently the job is failing due to Lock. We cannot control this job (like if one of packages cannot be free'd the write that one to error file and continue with next one).
So we are thinking of using Cobol-db2 program which can exectute Free Package command. if the command fails we can write it to error file.

My question is can we use Free Package commands in cobol-db2 program. Can anyone share a sample program.