Thank you very much for the feed back. I will look into the business function John provided. I also find piece of code where we can retrieve this information from the report structure. Here is the code.
/************************************************************************
* Variable declarations
************************************************************************/
LPReportSection pReportSection;
char buf[33];
unsigned long lIpcPid = 0;
/************************************************************************
* Declare structures
************************************************************************/
//UBEVAR dsUbeStructure = { 0 };
/************************************************************************
* Declare pointers
************************************************************************/
/************************************************************************
* Check for NULL pointers
************************************************************************/
if ((lpBhvrCom == (LPBHVRCOM) NULL) ||
(lpVoid == (LPVOID) NULL) ||
(lpDS == (LPDSD5904607) NULL))
{
jdeErrorSet (lpBhvrCom, lpVoid, (ID) 0, _J("4363"), (LPVOID) NULL);
return ER_ERROR;
}
/************************************************************************
* Set pointers
************************************************************************/
/************************************************************************
* Main Processing
************************************************************************/
pReportSection = lpBhvrCom->lpReportSection;
//memset((void *)(&dsUbeStructure), (int)('\0'), sizeof(UBEVAR));
//dsUbeStructure = lpBhvrCom->lpReportSection;
/* Report Infos */
jdeStrncpyTerminate (lpDS->szProgramId, pReportSection->pUBEVar->szReport, sizeof(lpDS->szProgramId));
jdeStrncpyTerminate (lpDS->szVersionId, pReportSection->pUBEVar->szVersion, sizeof(lpDS->szVersionId));
jdeStrncpyTerminate (lpDS->szPOTemplateId, pReportSection->pUBEVar->szPOTemplateName, sizeof(lpDS->szPOTemplateId));
/* Job Infos */
jdeStrncpyTerminate (lpDS->szComputerId, pReportSection->pUBEVar->szMachineKey, sizeof(lpDS->szComputerId));
lIpcPid = jdeGetPid();
if (lIpcPid)
{
LongToMathNumeric(lIpcPid, &lpDS->mnProcessID);
}
MathCopy (&lpDS->mnServerJobNumber, &pReportSection->pUBEVar->mnJobNum);