2

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.

moral
  • 81
  • 8

1 Answers1

0

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);
moral
  • 81
  • 8