简体   繁体   中英

TWSz Java API Set duration

When I try set duration using this code:

Job job = new Job();
job.setName("5");
long dur = 1000;
job.setEstimatedDuration(1000);

job.setPriority(-1);

ZOSJobDefinition jobDef = new ZOSJobDefinition();

jobDef.setFlowTargetKey(new FlowTargetKey("CPU1"));
jobDef.setTaskType(TaskTypes.ZOS_JOB_TASK);
jobDef.setJclName("DMSORT");
job.setJobDefinition(jobDef);

I get error EQQX489E THE DURATION OF OPERATION CPU1 5 IS INVALID, 0 SEC*100. I do it in the same way like in the documentation, however, I try also:

long dur = Long.valueOf(1000);
job.setEstimatedDuration(dur);

and

long dur = 1000L;
job.setEstimatedDuration(dur);

but I still get the same error.

There is wrong example in documentation. Solution is:

    Job job = new Job();
    job.setName("5");
    job.setPriority(1);
   **//job.setEstimatedDuration(1000);**

    ZOSJobDefinition jobDef = new ZOSJobDefinition();

    jobDef.setFlowTargetKey(new FlowTargetKey("CPU1"));
    jobDef.setTaskType(TaskTypes.ZOS_JOB_TASK);
    jobDef.setJclName("DMSORT");
    **jobDef.setNormalElapsedTime(1000L);**
    job.setJobDefinition(jobDef);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM