version 1.11, 2003/04/02 00:44:19
|
version 1.12, 2003/04/17 20:12:23
|
|
|
#include <qwtchgjb.cleinc> | #include <qwtchgjb.cleinc> |
#include "qushdler.H" | #include "qushdler.H" |
| |
|
//Needed for SQL APIs |
|
#include "sqlcli.h" |
|
|
// Structure need for the CHGJOB(QWTCHGJB) API | // Structure need for the CHGJOB(QWTCHGJB) API |
typedef struct jobChangeInfo | typedef struct jobChangeInfo |
{ | { |
|
|
//////////////////////////////////////////////////// | //////////////////////////////////////////////////// |
int cimserver_initialize(void) | int cimserver_initialize(void) |
{ | { |
|
SQLHENV henv; // SQL environment variable |
|
long attr; // SQL attribute to be set |
| |
// setup cancel handler to make sure job log gets saved if we exit abnormally | // setup cancel handler to make sure job log gets saved if we exit abnormally |
// TODO: this is currently commented out because it causes build errors - | // TODO: this is currently commented out because it causes build errors - |
|
|
// Change authority to the qypsjobd job description | // Change authority to the qypsjobd job description |
//////////////////////////////////////////////////// | //////////////////////////////////////////////////// |
system("QSYS/GRTOBJAUT OBJ(QSYS/QYCMJOBD) OBJTYPE(*JOBD) USER(*PUBLIC) AUT(*EXCLUDE)"); | system("QSYS/GRTOBJAUT OBJ(QSYS/QYCMJOBD) OBJTYPE(*JOBD) USER(*PUBLIC) AUT(*EXCLUDE)"); |
|
|
|
SQLAllocEnv(&henv); // Allocating SQL environment variable |
|
attr = SQL_TRUE; // Set SQL attribute to true |
|
|
|
// Set the SQL server mode to true. |
|
// This will allow multiple connections to the same data source. |
|
SQLSetEnvAttr(henv,SQL_ATTR_SERVER_MODE, &attr,0); |
} | } |
catch (...) | catch (...) |
{ | { |