Running Workload Automation Programming Language on a started task workstation

You can run Workload Automation Programming Language on an HCL Workload Automation for Z started task workstation. In this way, you can code Workload Automation Programming Language commands within user fields, enabling commands to be issued without creating individual jobs.

To use this capability, you must create a started task workstation. For details about configuring a started task workstation, see HCL Workload Scheduler for Z: Planning and Installation.

The Started Task Workstation feature operates differently, according to the setting of the OPCOPTS RCLEANUP statement.

If you set OPCOPTS RCLEANUP(YES):

  • The started task JCL can be defined as a job that can call the started task.
  • The installed EQQYXJPX procedure can be called directly from the library in which it is installed either by including it in the necessary concatenation, or by using a JCLLIB statement.
  • Symbolic overrides can reference GLOBAL variables, allowing application tables to override them for individual jobs.
The following example shows an STC job for RCLEANUP(YES) (EQQJOBS member EQQWCMD1):
//EQQWCMD1 JOB CLASS=A,MSGCLASS=X 
//*%OPC SCAN 
//**********************************************************************
//* THIS SHOULD BE USED ON AN STC WORKSTATION TO RUN WAPL COMMANDS FOR 
//* INSTALLATIONS WHERE OPCOPTS RCLEANUP(YES) IS USED. 
//* 
//* IT IS RECOMMENDED THAT THE JOBNAME BE PREFIXED BY THE SUBSYS NAME 
//* E.G. TWSACMD1 
//* 
//* TO ENABLE USER WAPL MEMBERS TO BE INCLUDED FROM WITHIN USER FIELDS 
//* ADD A DD STATEMENT POINTING TO YOUR OWN CODE LIBRARY E.G. USRCODE 
//* 
//**********************************************************************
//EQQYXJPX EXEC EQQYXJPX, 
//         SUBSYS=TWSA 
//EQQYLOG3 DD SYSOUT=* 
//*USRCODE DD DISP=SHR,DSN=MY.USER.CODE 
//SYSIN    DD DISP=SHR,DSN=TWS.V920.SEQQWAPL(USRSYSIN) 
//EQQCPOP  DD * 
&OADID. &OYMD1.&OHHMM. &OOPNO 

If you set OPCOPTS RCLEANUP(NO):

  • Define the JCL as a procedure.
  • Modify a copy of EQQYXJPX, with additional JCL statements appended for running as an STC operation.
  • Specify OPCOPTS VARPROC(YES) to have the HCL Workload Automation for Z JCL variables resolved within a procedure.
Note: If VARPROC is not set to YES, be cautious when turning on this feature. Check all pre-existing JCL to search for any jobs that contain both //*%OPC SCAN and any instream procedures, because these might be affected by this change if the //*%OPC SCAN statement precedes the instream procedure, and symbolic parameters are coded within the procedure.
The following example shows additional statements to add to EQQYXJPX to create an STC job for RCLEANUP(NO) (EQQJOBS member EQQWCMD2):
//**********************************************************************
//* THIS SHOULD BE USED ON AN STC WORKSTATION TO RUN WAPL COMMANDS FOR 
//* INSTALLATIONS WHERE OPCOPTS RCLEANUP(NO) IS USED. 
//* 
//* IT IS RECOMMENDED THAT THE JOBNAME BE PREFIXED BY THE SUBSYS NAME 
//* E.G. TWSACMD1 
//* 
//* TO ENABLE USER WAPL MEMBERS TO BE INCLUDED FROM WITHIN USER FIELDS 
//* ADD A DD STATEMENT POINTING TO YOUR OWN CODE LIBRARY E.G. USRCODE 
//* 
//**********************************************************************
//EQQYLOG3 DD SYSOUT=* 
//*USRCODE DD DISP=SHR,DSN=MY.USER.CODE 
//SYSIN    DD DISP=SHR,DSN=TWS.SEQQWAPL(USRSYSIN) 
//*%OPC SCAN 
//EQQCPOP  DD * 
&OADID. &OYMD1.&OHHMM. &OOPNO  
//         PEND 

Regardless of how you set RCLEANUP:

  • An EQQCPOP DD must be coded as shown to pass the occurrence ID to the process.
  • An OPC SCAN statement is required to resolve the occurrence variables.
  • The SYSIN can point to member USRSYSIN in the SEQQWAPL library, which contains command INCLUDE USER_FIELD(EQQ-SYSIN-*) that points Workload Automation Programming Language to the user fields of the submitting operation to find the commands to run.
  • Consider adding an additional DD statement, with a name of your choice, that points to a library in which Workload Automation Programming Language INCLUDE members could be stored and referenced from within the commands that are run by this job. If you do this, ensure that either the library is used regularly, or an appropriate HSM management class is assigned to avoid migration; an INCLUDE library that is not regularly used could become migrated and delay Workload Automation Programming Language commands.
  • Consider adding an EQQYLOG3 DD statement, because INCLUDE processing means that the commands run from user fields will appear only at message level 3.

The commands can then be coded as user fields prefixed with EQQ-SYSIN- and are run in sort order.

There can be up to 100 user fields, some or all of which could be Workload Automation Programming Language statements, each up to 54 characters in length. Normal Workload Automation Programming Language continuation rules apply, therefore if a command does not fit within 54 characters it can continue in the next user field.

The following example shows commands coded in User Fields. This example in the first operation of an application will seek and HOLD or NOP any operations tagged with appropriate user fields and values.
 ---------------------------- OPERATION USER FIELDS ----------- Row 1 to 3 of 3
 Command ===>                                                 
Scroll ===> CSR
 Enter/Change data in the rows, and/or enter any of the following               
 row commands:                                                                  
 I(nn) - Insert, R(nn),RR(nn) - Repeat, D(nn),DD - Delete                       
 Application     : CMDDEMO                    Demonstrate CMD1 WS               
 Operation       : CMD1 001                                                     
 Jobname         : WSLCCMD1                                                     
 Row  User Field Name  User Field Value                                         
 cmd                   ----+----1----+----2----+----3----+----4----+----5----   
 '''' EQQ-SYSIN-01     VARSUB SCAN (!)                                          
 '''' EQQ-SYSIN-02     HOLD ADID(!OADID.) IA(!OYMD1.!OHHMM.) USRF(HOLD=YES)     
 '''' EQQ-SYSIN-03     NOP ADID(!OADID.) IA(!OYMD1.!OHHMM.) USRF(NOP=YES)       
 ******************************* Bottom of data ********************************

Because a started task is not limited to a single occurrence of the same name running simultaneously, you define only a single Workload Automation Programming Language started task, which can run many times in parallel. It is recommended that you use a special resource exclusively for any Workload Automation Programming Language started task operations, to limit the number of processes you want to allow in parallel.