HCL Workload Automation, Version 9.4

Modify JCL Job

Describes how to modify a JCL job using the API.

First read the JCL job and lock it:
JCLKey jobk1 = new JCLKey("TWSSD.CWSD64.JOBLIB","MYJCL1");

JCL jobJCL = (JCL)model.getTWSObject(JCL.class, jobk1, true, null);
The parameters to modify a JCL job are:
  • The job key, which consists of the library name and the JCL job name
  • The modified JCL.

The command returns the ID of the modified job.

The following example code modifies a JCL job that has already been read and locked:
jcl.getTextLines().add("//"+name+" JOB (876903,D07),'AAAAAAA',MSGLEVEL=(1,1), 00010000");
jcl.getTextLines().add("//     MSGCLASS=A,CLASS=A,NOTIFY=PIPPO                00020000");

id = model.setTWSObject(jcl, true, true, null);