HCL Workload Automation, Version 9.4

Add JCL Job

Describes how to add a JCL job using the API.

The parameters to add a JCL job are:
  • The job itself
  • The job key, which consists of the library name and the JCL job name.

The command returns the ID of the created job.

The following example code creates a JCL job and adds it to a specific job library:
JCL jcl = new JCL();
JCLKey jobk1 = new JCLKey("TWSSD.CWSD64.JOBLIB","MYJCL");
jcl.getTextLines().add("//"+name+" JOB (876903,D07),'AAAAAAA',MSGLEVEL=(1,1), 00010000");
jcl.getTextLines().add("//     MSGCLASS=A,CLASS=A,NOTIFY=CARDELL              00020000");
jcl.getTextLines().add("//STEP1    EXEC PGM=IEFBR14                           00030001");
jcl.getTextLines().add("//SYSPRINT DD SYSOUT=*                                00060000");

id = model.addTWSObject(jcl,null);