具有IEFSSREQ宏的MVS JES2清除作业

时间:2018-07-25 07:18:41

标签: c zos mvs

我想通过使用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

这里是我所讨论的文档的链接。我正在使用“修改作业功能调用”(编号85),这是第460页。

https://www-304.ibm.com/servers/resourcelink/svc00100.nsf/pages/zOSV2R3SA380679/ $ file / ieaf200_v2r3.pdf

1 个答案:

答案 0 :(得分:1)

我看不到明显的东西。我试图让您的代码在我们的系统上运行,但是用C语言我还不够好,很遗憾,无法完成上面未显示的内容。

或者,我尝试使其在普通汇编器中运行。我得到的结果和你一样。我尝试了PURGE和CANCEL请求。所有人似乎什么都没做。但是,当指定无效的Jobid时,IEFSSREQ会抱怨并带有相应的返回码,因此我知道IEFSSREQ正在正确调用。一定是愚蠢的。

抱歉,到目前为止,我没有更多帮助