Add jobStreamInstance

82 views Asked by At

I'm trying to add application to CP using method:

  addJobStreamInstance(Identifier jobStreamId, java.util.Date inputArrivalTime, java.lang.String alias, Context context)

but I getting the error AWSJCS011E An internal error has occurred. The error is the following: "UNSUPPORTED_METHOD".

My code is:

    QueryFilter queryFilter = new QueryFilter();
    queryFilter.setFilter(JobStreamFilters.JOB_STREAM_NAME, "APNAME");
    QueryResult queryResult = model.queryTWSObject(JobStream.class, queryFilter, 5, null);
    List<JobStreamHeader> jobStreamHeaderList = queryResult.getList();
    Identifier applicationId = jobStreamHeaderList.get(0).getId();
    plan.addJobStreamInstance(applicationId, new Date(),jobStreamHeaderList.get(0).getName()+"A1",null);
1

There are 1 answers

1
Franco Mossotto On BEST ANSWER

That method is for TWSd only.

The following methods are available on TWS for z/OS:

addJobStreamInstance(JobStreamInPlan jobStream, Context context);
addJobStreamInstance(String name, Date startTime, Date deadlineTime, int priority, String description, String group, String owner, String ownerDescription, String variableTable, String authorityGroup, boolean holdAll, DependenciesResolutionOption dependeciesResolution, Context context);
addJobStreamInstanceWithVariableSubstitution(String name, Date startTime, Date deadlineTime, int priority, String description, String group, String owner, String ownerDescription, String variableTable, String[][] variablesToBeSubstituted, String authorityGroup, boolean holdAll, DependenciesResolutionOption dependeciesResolution, Context context)