带有 IEFSSREQ 宏的 MVS JES2 清除作业
MVS JES2 purge job with IEFSSREQ macro
我想 purge/cancel/spin 通过使用 IEFSSREQ 宏向 JES2 请求操作来完成一项工作。一切似乎都运行良好,但没有工作受到请求的影响。我认为这是 SSJM 结构中的过滤器问题,但是当我在过滤器中未指定任何内容时,我没有错误(根据文档我应该有一个)并且也没有工作受到影响。
这是我的代码:
char *pcJobId = "JOB03101";
int iRc;
char * __ptr32 pworkArea = __malloc31(60);
memset(pworkArea, 0, 60);
struct ssib * __ptr32 pSSIB = __malloc31(sizeof(struct ssib));
struct ssob * __ptr32 pSSOB = __malloc31(sizeof(struct ssob));
struct ssjm * __ptr32 pSSJM = __malloc31(sizeof(struct ssjm));
memset(pSSIB, 0, sizeof(struct ssib));
memcpy(pSSIB->ssibid, "SSIB", 4);
pSSIB->ssiblen = SSIBSIZE;
memcpy(pSSIB->ssibssnm, "JES2", 4);
memset(pSSJM, 0, sizeof(struct ssjm));
memcpy(pSSJM->ssjmeye, "SSJMPL ", 8);
pSSJM->ssjmlen = SSJMSIZE;
pSSJM->ssjmvrm = SSJMVRM1;
pSSJM->ssjmopt1 = SSJMPSYN;
pSSJM->ssjmreqp._ssjmtype = SSJMPRG;
pSSJM->ssjmsel1 = SSJMSOJI;
memcpy(pSSJM->ssjmojbi, pcJobId, 8);
memset(pSSOB, 0, sizeof(struct ssob));
memcpy(pSSOB->ssobid, "SSOB", 4);
pSSOB->ssoblen = SSOBHSIZ;
pSSOB->ssobfunc = (short int)85;
pSSOB->ssobssib = pSSIB;
pSSOB->ssobindv = (int)pSSJM;
void * __ptr32 * pParmList = __malloc31(4);
*pParmList = (void * __ptr32) ((int32_t)pSSOB | (int32_t)0x80000000); // the high-order bit must be on
iRc = 0;
__asm(" SAM31\n"
" SYSSTATE AMODE64=NO\n"
" IEFSSREQ\n"
" SYSSTATE AMODE64=YES\n"
" SAM64\n"
: "=XL:NR:r15"(iRc)
: "XL:NR:r1"(pParmList), "XL:NR:r13"(pworkArea)
: "r0", "r1", "r13", "r14", "r15");
printf("IEFSSREQ rc=%d\n", iRc);
printf("ssobretn=%d\n", pSSOB->ssobretn);
printf("ssjmretn=%d\n", pSSJM->ssjmretn);
printf("ssjmret2=%d\n", pSSJM->ssjmret2);
printf("ssjmnsjf=%d\n", pSSJM->ssjmnsjf);
printf("ssjmsjf8=%p\n", pSSJM->ssjmsjf8);
free(pworkArea);
free(pSSOB);
free(pParmList);
free(pSSJM);
根据文档,我在 SSJMSJF8 指针中获得了受请求影响的每个作业的反馈,SSJMNSJF 应该是我获得的反馈数量,这也是受请求影响的作业数量。
我的代码打印这个:
IEFSSREQ rc=0
ssobretn=0
ssjmretn=0
ssjmret2=0
ssjmnsjf=0
ssjmsjf8=0
这是我谈到的文档的 link。我正在使用修改作业函数调用(编号 85),这是第 460 页。
https://www-304.ibm.com/servers/resourcelink/svc00100.nsf/pages/zOSV2R3SA380679/$file/ieaf200_v2r3.pdf
我看不到明显的东西。我试图让您的代码在我们的系统上运行,但我在 C 方面不够好,很遗憾无法完成上面未显示的内容。
或者,我尝试在普通汇编程序中获取它 运行。我得到和你一样的结果。我尝试了 PURGE 和 CANCEL 请求。一切似乎都没有做任何事情。但是,当指定无效的 jobid 时,IEFSSREQ 会抱怨相应的 return 代码,因此我知道 IEFSSREQ 被正确调用。肯定是傻了。
抱歉,到目前为止我无法提供更多帮助
我想 purge/cancel/spin 通过使用 IEFSSREQ 宏向 JES2 请求操作来完成一项工作。一切似乎都运行良好,但没有工作受到请求的影响。我认为这是 SSJM 结构中的过滤器问题,但是当我在过滤器中未指定任何内容时,我没有错误(根据文档我应该有一个)并且也没有工作受到影响。
这是我的代码:
char *pcJobId = "JOB03101";
int iRc;
char * __ptr32 pworkArea = __malloc31(60);
memset(pworkArea, 0, 60);
struct ssib * __ptr32 pSSIB = __malloc31(sizeof(struct ssib));
struct ssob * __ptr32 pSSOB = __malloc31(sizeof(struct ssob));
struct ssjm * __ptr32 pSSJM = __malloc31(sizeof(struct ssjm));
memset(pSSIB, 0, sizeof(struct ssib));
memcpy(pSSIB->ssibid, "SSIB", 4);
pSSIB->ssiblen = SSIBSIZE;
memcpy(pSSIB->ssibssnm, "JES2", 4);
memset(pSSJM, 0, sizeof(struct ssjm));
memcpy(pSSJM->ssjmeye, "SSJMPL ", 8);
pSSJM->ssjmlen = SSJMSIZE;
pSSJM->ssjmvrm = SSJMVRM1;
pSSJM->ssjmopt1 = SSJMPSYN;
pSSJM->ssjmreqp._ssjmtype = SSJMPRG;
pSSJM->ssjmsel1 = SSJMSOJI;
memcpy(pSSJM->ssjmojbi, pcJobId, 8);
memset(pSSOB, 0, sizeof(struct ssob));
memcpy(pSSOB->ssobid, "SSOB", 4);
pSSOB->ssoblen = SSOBHSIZ;
pSSOB->ssobfunc = (short int)85;
pSSOB->ssobssib = pSSIB;
pSSOB->ssobindv = (int)pSSJM;
void * __ptr32 * pParmList = __malloc31(4);
*pParmList = (void * __ptr32) ((int32_t)pSSOB | (int32_t)0x80000000); // the high-order bit must be on
iRc = 0;
__asm(" SAM31\n"
" SYSSTATE AMODE64=NO\n"
" IEFSSREQ\n"
" SYSSTATE AMODE64=YES\n"
" SAM64\n"
: "=XL:NR:r15"(iRc)
: "XL:NR:r1"(pParmList), "XL:NR:r13"(pworkArea)
: "r0", "r1", "r13", "r14", "r15");
printf("IEFSSREQ rc=%d\n", iRc);
printf("ssobretn=%d\n", pSSOB->ssobretn);
printf("ssjmretn=%d\n", pSSJM->ssjmretn);
printf("ssjmret2=%d\n", pSSJM->ssjmret2);
printf("ssjmnsjf=%d\n", pSSJM->ssjmnsjf);
printf("ssjmsjf8=%p\n", pSSJM->ssjmsjf8);
free(pworkArea);
free(pSSOB);
free(pParmList);
free(pSSJM);
根据文档,我在 SSJMSJF8 指针中获得了受请求影响的每个作业的反馈,SSJMNSJF 应该是我获得的反馈数量,这也是受请求影响的作业数量。
我的代码打印这个:
IEFSSREQ rc=0
ssobretn=0
ssjmretn=0
ssjmret2=0
ssjmnsjf=0
ssjmsjf8=0
这是我谈到的文档的 link。我正在使用修改作业函数调用(编号 85),这是第 460 页。
https://www-304.ibm.com/servers/resourcelink/svc00100.nsf/pages/zOSV2R3SA380679/$file/ieaf200_v2r3.pdf
我看不到明显的东西。我试图让您的代码在我们的系统上运行,但我在 C 方面不够好,很遗憾无法完成上面未显示的内容。
或者,我尝试在普通汇编程序中获取它 运行。我得到和你一样的结果。我尝试了 PURGE 和 CANCEL 请求。一切似乎都没有做任何事情。但是,当指定无效的 jobid 时,IEFSSREQ 会抱怨相应的 return 代码,因此我知道 IEFSSREQ 被正确调用。肯定是傻了。
抱歉,到目前为止我无法提供更多帮助