JOB Number for the running UBE

  • Thread starter Its not on sale
  • Start date

Its not on sale

Reputable Poster
When a UBE is submitted to batch, is it possible to retrieve its job number. I do not want to go the F986110 route because there could be multiple UBEs running with same name and version. Is there an function or any BF that will do that .
 
To elaborate more , I want to get the number within the running UBE. So I sumbit R550001 to queue and its running, within the UBE itself , I want the job number so I can do something with it ?
 
The only way to get the job number is to submit the UBE using a BSFN. There are several available for that - just search.
 
Off the top of my head, I've done this before and will dig out a BSFN for you. Email me
It differs from release to release but yes, it can be done as the PDF has it when it starts to make it's name
smile.gif


[email protected]
 
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);
 
I've tried to implement the code and it is compiling. Could you please post .c and .h files.
Help highly appreciated.
 
[ QUOTE ]
I've tried to implement the code and it is NOT compiling. Could you please post .c and .h files.
Help highly appreciated.

[/ QUOTE ]
confused.gif
 
Back
Top